11-16-2022, 07:06 PM
One of few places the single quote fails is after DATA statements.
This works:
READ a, b, c, d
DATA 1, 2, 3, 4: REM Comment
This will not:
READ a, b, c, d
DATA 1, 2, 3, 4 ' Comment
The above DATA statement throw a syntax error at run-time.
To get around this I always resorted to using line labels for a brief description of multiple DATA lines like so:
ROW01: DATA 0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,0,0,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0
ROW02: DATA 0,0,0,0,3,0,0,0,0,3,0,0,0,0,0,3,0,0,3,0,0,0,0,0,3,0,0,0,0,3,0,0,0,0
ROW03: DATA 0,0,0,0,5,0,0,0,0,3,0,0,0,0,0,3,0,0,3,0,0,0,0,0,3,0,0,0,0,5,0,0,0,0
ROW04: DATA 0,0,0,0,3,0,0,0,0,3,0,0,0,0,0,3,0,0,3,0,0,0,0,0,3,0,0,0,0,3,0,0,0,0
ROW05: DATA 0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0
ROW06: DATA 0,0,0,0,3,0,0,0,0,3,0,0,3,0,0,0,0,0,0,0,0,3,0,0,3,0,0,0,0,3,0,0,0,0
ROW07: DATA 0,0,0,0,3,0,0,0,0,3,0,0,3,0,0,0,0,0,0,0,0,3,0,0,3,0,0,0,0,3,0,0,0,0
ROW08: DATA 0,0,0,0,3,3,3,3,3,3,0,0,3,3,3,3,0,0,3,3,3,3,0,0,3,3,3,3,3,3,0,0,0,0
ROW09: DATA 0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,1,0,0,1,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0
ROW10: DATA 0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,129,0,0,129,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0
ROW11: DATA 0,0,0,0,0,0,0,0,0,3,0,0,1,1,1,1,1,1,1,1,1,1,0,0,3,0,0,0,0,0,0,0,0,0
ROW12: DATA 0,0,0,0,0,0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0,0,0,0,3,0,0,3,0,0,3,0,0,0,0,0,0
ROW26: DATA 0,0,0,0,3,3,3,3,3,3,0,0,3,3,3,3,0,0,3,3,3,3,0,0,3,3,3,3,3,3,0,0,0,0
ROW27: DATA 0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,3,0,0,3,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0
ROW28: DATA 0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,3,0,0,3,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0
ROW29: DATA 0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0
However, after reading your explanation of REM it got me to thinking. I wondered if this would work:
READ a, b, c, d
DATA 1, 2, 3, 4: ' Comment
And it does. I can now fully comment each line of DATA with a more thorough explanation of the values.
Go figure.
This works:
READ a, b, c, d
DATA 1, 2, 3, 4: REM Comment
This will not:
READ a, b, c, d
DATA 1, 2, 3, 4 ' Comment
The above DATA statement throw a syntax error at run-time.
To get around this I always resorted to using line labels for a brief description of multiple DATA lines like so:
ROW01: DATA 0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,0,0,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0
ROW02: DATA 0,0,0,0,3,0,0,0,0,3,0,0,0,0,0,3,0,0,3,0,0,0,0,0,3,0,0,0,0,3,0,0,0,0
ROW03: DATA 0,0,0,0,5,0,0,0,0,3,0,0,0,0,0,3,0,0,3,0,0,0,0,0,3,0,0,0,0,5,0,0,0,0
ROW04: DATA 0,0,0,0,3,0,0,0,0,3,0,0,0,0,0,3,0,0,3,0,0,0,0,0,3,0,0,0,0,3,0,0,0,0
ROW05: DATA 0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0
ROW06: DATA 0,0,0,0,3,0,0,0,0,3,0,0,3,0,0,0,0,0,0,0,0,3,0,0,3,0,0,0,0,3,0,0,0,0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,3,3,3,3,3,3,3,3,3,0,0,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0
ROW21: DATA 0,0,0,0,3,0,0,0,0,3,0,0,0,0,0,3,0,0,3,0,0,0,0,0,3,0,0,0,0,3,0,0,0,0
ROW22: DATA 0,0,0,0,3,0,0,0,0,3,0,0,0,0,0,131,0,0,131,0,0,0,0,0,3,0,0,0,0,3,0,0,0,0
ROW23: DATA 0,0,0,0,5,3,3,0,0,3,3,3,3,3,3,3,1,1,3,3,3,3,3,3,3,0,0,3,3,5,0,0,0,0
ROW24: DATA 0,0,0,0,0,0,3,0,0,3,0,0,3,0,0,0,0,0,0,0,0,3,0,0,3,0,0,3,0,0,0,0,0,0
ROW25: DATA 0,0,0,0,0,0,3,0,0,3,0,0,3,0,0,0,0,0,0,0,0,3,0,0,3,0,0,3,0,0,0,0,0,0
ROW26: DATA 0,0,0,0,3,3,3,3,3,3,0,0,3,3,3,3,0,0,3,3,3,3,0,0,3,3,3,3,3,3,0,0,0,0
ROW27: DATA 0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,3,0,0,3,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0
ROW28: DATA 0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,3,0,0,3,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0
ROW29: DATA 0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0
However, after reading your explanation of REM it got me to thinking. I wondered if this would work:
READ a, b, c, d
DATA 1, 2, 3, 4: ' Comment
And it does. I can now fully comment each line of DATA with a more thorough explanation of the values.
Go figure.