Shop OBEX P1 Docs P2 Docs Learn Events
SPIN2 Object Arrays - Compile Errors vs Documentation — Parallax Forums

SPIN2 Object Arrays - Compile Errors vs Documentation

Has anyone tried to use data structures in SPIN2 using arrays of objects defined like:

async[10]: "asynchronous"

and tried to call methods within them?

currentString := async[ asyncpointer ].getRecvStrPtr()

In Spin on the P1 this works. On the P2, in prop tool and PNUT, this fails to compile with "expected "."" after "async", and all variations of adding . into this to separate the array index does not work (it expects it to be a constant or method, as I figured). Here is the original Spin reference. https://www.parallax.com/sites/default/files/downloads/AN003-AbstractDataStructures-v1.0.pdf

On Page 3 of the SPIN2 documentation, it indicates that arrays of objects are still supported; I can't think of other syntax that would be used to call them, though the manual does not indicate the syntax.

I'd like to know what's up with this, as I need it for a very useful test automation project you guys are gonna like.

Comments

Sign In or Register to comment.