Array NXT-G Block
NXT Repository/Programming/NXT-G/

I’ve uploaded here my NXT-G “Array Block” directory. It is fully functional, but lacks any documentation at present. It uses Text wires to pass array data (NXT-G does not support array wires at present) as “binary string”. The array elements are numbered 1,2,3,… A value 0 in the Position control reads the last element or writes to the next free element. Negative values can be used to start counting from the end of the array (i.e. reading from Position -2 reads the one before last element etc.). Padding and resizing is done automatically in Write mode when Position is out of bounds. A negative Size value in Create/resize mode means adding/removing elements from the beginning of the array, rather then the end (positive Size value).
I’ve used some nice NXT-G Blocking techniques in this Block, some of them use undocumented toolkit functions and/or LabView functions. These will be reviewed in an upcoming post.
Feel free to download and test it, and I’ll be happy for any feedback (good or bad..) by email to guy@nxtasy.org.