Can I create an array inside of an array of symbols?
FAQ #101460
No, as such a definition would be ambiquous as the square brackets are used to define an array but also as indication of the offset inside an array.
Explanation
The square brackets are used for the following cases:
- The definition of an array of symbols is done by using the square brackets behind the media type in the symbol definition:
BaseSymbol EQU R [ArraySize] - The square brackets are also used for the definition of an offset inside an array:
SymbolInsideArray EQU R BaseSymbol[Offset]
alternatively
SymbolInsideArray EQU R BaseSymbol+Offset
In case of a definition of an array inside an array, it would not be clear which square brackets shall contain the offset (inside the first array) and which one shall contain the size of the new array. Using a definition such as "the first square bracket contains the offset" does not work either, as in case of the "+" notation there would not be a second square bracket.
Therefore the following code will lead to the error message below the code:
Assembling: Untitled1.src
Error 1057: Untitled1.src: Line 43: Symbol is not an array: SymbolInsideArray1: SymbolInsideArray0
1 errors, 0 warnings
Remarks
- In PG3 it was possible to create such nested arrays (because the syntaxt for the definition has been more restricted.
- In early versions of PG5 there has not been an error in case of such an ambiquous definition (but most likely the result has not been what the programmer expected).
- PG5 2.0 does abort the build with the error 1057 (see above) in case the
Categories
Local FAQ Deutschland / SEdit (IL programming)
Local FAQ Deutschland / Symbol Editor
PG5 2.0 / SEdit (IL programming)
PG5 2.0 / Symbol Editor
Last update: 31.05.2015 18:27
First release: 13.07.2010 09:44
Views: 5458