Golden Child
Member
- Joined
- Dec 20, 2022
- Messages
- 23
I was playing with NABU Basic in mame, and came across a couple of unusual behaviors and was curious if they happened on real hardware.
For example, RND(0) and RND(1) behave exactly opposite of the way I would expect. RND(0) should repeat the last value and positive values like RND(1) will give the next value.
10 FOR R = 0 TO 1 : FOR I = 1 TO 8 : PRINT R,RND(R) : NEXT : NEXT
Also LOCATE is CURSOR in Nabu Basic, but the parsing of a line doesn't work correctly. Any cursor command should be left on its own at the end of a line.
100 FOR L = 23 TO 1 STEP -1 : CURSOR L,L
110 PRINT L : NEXT
will work, however
100 FOR L = 23 TO 1 STEP -1 : CURSOR L,L : PRINT L : NEXT
will give a syntax error.
Could someone with real hardware check the behavior of RND and CURSOR to see if it matches the emulator?
For example, RND(0) and RND(1) behave exactly opposite of the way I would expect. RND(0) should repeat the last value and positive values like RND(1) will give the next value.
10 FOR R = 0 TO 1 : FOR I = 1 TO 8 : PRINT R,RND(R) : NEXT : NEXT
Also LOCATE is CURSOR in Nabu Basic, but the parsing of a line doesn't work correctly. Any cursor command should be left on its own at the end of a line.
100 FOR L = 23 TO 1 STEP -1 : CURSOR L,L
110 PRINT L : NEXT
will work, however
100 FOR L = 23 TO 1 STEP -1 : CURSOR L,L : PRINT L : NEXT
will give a syntax error.
Could someone with real hardware check the behavior of RND and CURSOR to see if it matches the emulator?