dykstrom / basic-mode

Emacs major mode for editing BASIC code
GNU General Public License v3.0
7 stars 10 forks source link

Double-quoted strings can be terminated by CR/NL #23

Open hackerb9 opened 1 year ago

hackerb9 commented 1 year ago

I noticed a valid BASIC program was not highlighted correctly because the string in line 10 is missing the double-quote at the end. It looked something like this:

10 PRINT "Hello, World!
20 FOR T=32768 TO 65534
30 IF PEEK(T)=ASC("H") AND PEEK(T+1)=ASC("e") THEN PRINT T
40 NEXT T
50 END

I do not know how many forms of BASIC allow literal strings to be terminated by the end of the line, but the TRS-80 Model 100 BASIC does and Microsoft's GW-BASIC does as well. (Or, at least I believe GW-BASIC does, I'm testing using an emulator called PC-BASIC, which is supposed to be very accurate.)