I'm reading up on arrays in the manual and I learned something new (never did any thing complicated with arrays before):
p. 278, version 2015-12-01One last bit of information that is implied above: You can write aliases to other aliases. In the above example, you could create a name for a BYTE variable at the end of the array with:
last_byte VAR my_bytes[31]
This works even though "my_bytes" is, itself, an alias.
I can TX/RX the entire array, and refer to individual elements with aliases, and not use ArrayName[n] syntax. It makes for a much more structured approach to defining a structure (old COBOL habits die hard).
Bookmarks