DAY 011: REM
#7
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,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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.
Reply


Messages In This Thread
DAY 011: REM - by SMcNeill - 11-16-2022, 04:43 PM
RE: DAY 011: REM - by bplus - 11-16-2022, 05:25 PM
RE: DAY 011: REM - by SMcNeill - 11-16-2022, 05:48 PM
RE: DAY 011: REM - by CharlieJV - 11-16-2022, 06:04 PM
RE: DAY 011: REM - by SMcNeill - 11-16-2022, 06:21 PM
RE: DAY 011: REM - by mnrvovrfc - 11-16-2022, 06:20 PM
RE: DAY 011: REM - by TerryRitchie - 11-16-2022, 07:06 PM
RE: DAY 011: REM - by SMcNeill - 11-16-2022, 07:29 PM
RE: DAY 011: REM - by TerryRitchie - 11-16-2022, 07:47 PM
RE: DAY 011: REM - by SMcNeill - 11-16-2022, 08:44 PM
RE: DAY 011: REM - by CharlieJV - 11-16-2022, 10:00 PM
RE: DAY 011: REM - by bplus - 11-16-2022, 08:27 PM
RE: DAY 011: REM - by Pete - 11-16-2022, 08:32 PM
RE: DAY 011: REM - by Jack - 11-16-2022, 08:37 PM
RE: DAY 011: REM - by Pete - 11-16-2022, 09:20 PM
RE: DAY 011: REM - by mnrvovrfc - 11-16-2022, 10:22 PM
RE: DAY 011: REM - by Dav - 11-16-2022, 10:03 PM
RE: DAY 011: REM - by CharlieJV - 11-16-2022, 10:13 PM
RE: DAY 011: REM - by Pete - 11-16-2022, 10:17 PM
RE: DAY 011: REM - by Pete - 11-16-2022, 11:04 PM
RE: DAY 011: REM - by SMcNeill - 11-16-2022, 11:13 PM
RE: DAY 011: REM - by Pete - 11-16-2022, 11:53 PM
RE: DAY 011: REM - by Dav - 11-17-2022, 12:45 AM
RE: DAY 011: REM - by CharlieJV - 11-17-2022, 01:01 AM
RE: DAY 011: REM - by mnrvovrfc - 11-17-2022, 01:20 AM
RE: DAY 011: REM - by SMcNeill - 11-17-2022, 12:59 AM
RE: DAY 011: REM - by Pete - 11-17-2022, 01:04 AM
RE: DAY 011: REM - by TerryRitchie - 11-17-2022, 02:02 AM
RE: DAY 011: REM - by Dav - 11-17-2022, 01:18 AM
RE: DAY 011: REM - by Pete - 11-17-2022, 01:23 AM
RE: DAY 011: REM - by Pete - 11-17-2022, 02:25 AM
RE: DAY 011: REM - by mnrvovrfc - 11-17-2022, 07:55 PM
RE: DAY 011: REM - by Pete - 11-17-2022, 08:26 PM
RE: DAY 011: REM - by bplus - 11-17-2022, 09:39 PM



Users browsing this thread: 1 Guest(s)