Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error on last version of the compiler (solved)
#1
My program works when compiled in version 116 but does not work when compiled in version 117.

Example:
- select 3 discs.
- move from 1 to 3
- move from 3 to 1

It gives an error in the last version.
(see attached files)
.zip   NewCompiler.zip (Size: 16.87 KB / Downloads: 174)
Reply
#2
I recompile it with v1.17.2 and it worked as in 1.16.
So the bug is introduced in the 1.17.3-beta.

Thanks for the report. Let me investigate it.
Reply
#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
#4
Okay.
Try this new beta and let me know if it works :-)
http://www.boriel.com/files/zxb/zxbasic-...a19.tar.gz
http://www.boriel.com/files/zxb/zxbasic-...beta19.zip
http://www.boriel.com/files/zxb/zxbasic-...-win32.zip
http://www.boriel.com/files/zxb/zxbasic-...x64.tar.gz
http://www.boriel.com/files/zxb/zxbasic-...cos.tar.gz
Reply
#5
Works, Thanks.
And thanks for the clarification about DATE.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)