05-16-2024, 10:51 PM
(05-16-2024, 09:57 PM)grymmjack Wrote: I ran into this too.
Code: (Select All)DATA 9: ' (yep)
Exactly
The IDE didn't catch it then either.
The IDE can't catch it, as it's not a glitch.
For example, let's take a look at this person in my address book:
Code: (Select All)
DATA John, Doe, 123, 49er's Street, New York, New York, 12345
First name -- string
Last name -- string
House/Apt number -- number
Street name -- string
City name -- string
State name -- string
Zip code -- number
Now, which of the next two statements do you support as being true:
1) That's correct DATA as written and will process in the proper fields with zero issues.
or
2) That's only half the data, as that ' is a remark and everything after it doesn't count as data, therefore it's going to error out when being read.
Note that BASIC wouldn't have this issue, if DATA strings had the same rules as everything else in the language -- they had to be INSIDE QUOTES!! Unfortunately, in an attempt to save as much byte size, disk space, and memory, as possible back in the day, DATA doesn't require strings to be in quotes.
And that's where this "glitch" tends to pop up and catch folks unaware who aren't thinking about it.
But, as we tend to try and be QB45-compatible as much as possible, we can't really call this a bug. It's just the way BASIC tends to do DATA -- even if that does get rather messy from time to time.