Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error on last version of the compiler (solved)
#3
On top of that, I see this construct, which is not allowed:

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
Reply


Messages In This Thread
RE: Error on last version of the compiler - by boriel - 10-19-2024, 05:48 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)