11-16-2022, 07:47 PM
(11-16-2022, 07:29 PM)SMcNeill Wrote: @TerryRitchie The reason for the single quote failing to work as a comment with DATA statements is that it's proper syntax FOR the data statement.
DATA I don't like cheese., I don't like rootbeer., And I don't like you babe!
The above is 3 distinct data entries. Quotes aren't required for strings with DATA (even though I've always felt that they should be), and the above holds each statement separated by the comma as being a distinct data entry.
As you've noticed: End the DATA line with a : (colon), and then you can freely make use of the single quote comment style without any issues.
I ran into a slight issue. If you have more than one DATA line the colon trick does not work:
READ a, b, c, d, e
DATA 1, 2, 3, 4: ' comment
DATA 5
When trying to read the value for e a syntax error is thrown. Oh well, thought I was on to something there.