On top of that, I see this construct, which is not allowed:
DATAs cannot be declared within a function, because they can contain expressions like this one:
This will use x = 0 (and might even crash, untested), as the value of x is never known.
So bear in mind that the next beta will not allow the PROCEDURE DataChars in your program.
For the moment, this bug has been fixed (still allowing DATA inside SUBs and FUNCTIONS).
See here for further info: https://github.com/boriel-basic/zxbasic/issues/835
Code:
Sub any_name
DATA "A", "B", "C"
End Sub
DATAs cannot be declared within a function, because they can contain expressions like this one:
Code:
Sub any_name
DIM x as UInteger
LET x = RND * 512
DATA x * x
End Sub
READ q
This will use x = 0 (and might even crash, untested), as the value of x is never known.
So bear in mind that the next beta will not allow the PROCEDURE DataChars in your program.
For the moment, this bug has been fixed (still allowing DATA inside SUBs and FUNCTIONS).
See here for further info: https://github.com/boriel-basic/zxbasic/issues/835