remy / vscode-nextbasic

VS Code tools for NextBASIC
https://marketplace.visualstudio.com/items?itemName=remysharp.nextbasic
9 stars 2 forks source link

#xxx is unknown and not in a #define statement #42

Open thims opened 9 months ago

thims commented 9 months ago

Extension v1.9.1. It refuses to run or export the following program:

1350 DEFPROC flush(chan)
1360 LOCAL n,c
1370 REPEAT
1380 DIM #chan TO n
1390 WHILE n >  0
1400 NEXT #chan TO c
1410 REPEAT UNTIL 0
1420 ENDPROC

(snippet from the wifi2.bas)

with the error:

#chan is unknown and not in a #define statement

in lines 1380 and 1400.

Although the txt2bas 1.17.0 doesn't generate this error when running from the command line.

remy commented 7 months ago

I've not tested this since the update of 1.10.0, but I'm 99% sure it's still an issue and caused by my own custom definitions (that are bespoke to the vscode extension).