6 hours ago
Hello,
Either I have found a bug or there's something I'm not doing right
This link for QBJS:
https://qbjs.org/
I'm using it while looking at the Phoenix WIKI page for CIRCLE here
https://qb64phoenix.com/qb64wiki/index.php/CIRCLE
In it I copy the example code into QBJS, this code
Try to run it and I get the error
ERROR : 0 :
expected expression, got ')'
_runProgram@https://qbjs.org/qbjs-ide.js?v=0.8.2:265:26
After some experimenting I found that this code will run
But this will not
expected expression, got ';'
Why is that? I can't use QBJS to learn keywords in QB64, it fails for things like this. I'm lost as to what I did wrong.
Either I have found a bug or there's something I'm not doing right
This link for QBJS:
https://qbjs.org/
I'm using it while looking at the Phoenix WIKI page for CIRCLE here
https://qb64phoenix.com/qb64wiki/index.php/CIRCLE
In it I copy the example code into QBJS, this code
Code: (Select All)
SCREEN 12
r& = 200 'radius change circle size and position here
cx& = 320 'center x horizontal
cy& = 240 'center y vertical
DO
i = _MOUSEINPUT
x& = _MOUSEX
y& = _MOUSEY
xy& = ((x& - cx&) ^ 2) + ((y& - cy&) ^ 2) 'Pythagorean theorem
IF r& ^ 2 >= xy& THEN CIRCLE (cx&, cy&), r&, 10 ELSE CIRCLE (cx&, cy&), r&, 12
LOOP UNTIL INKEY$ = CHR$(27) 'escape key exit
Try to run it and I get the error
ERROR : 0 :
expected expression, got ')'
_runProgram@https://qbjs.org/qbjs-ide.js?v=0.8.2:265:26
After some experimenting I found that this code will run
Code: (Select All)
a = 0
b = 0
a = a + b
But this will not
Code: (Select All)
a& = 0
b& = 0
a& = a& + b&
expected expression, got ';'
Why is that? I can't use QBJS to learn keywords in QB64, it fails for things like this. I'm lost as to what I did wrong.
Very new here!