Closed udhos closed 5 years ago
The following program demonstrates the same problem, more simply:
10 DIM a(3)
20 FOR I = 1 TO 3
30 READ a[I]
40 NEXT I
50 DATA 3, 4, 1, 7 , 9
The problem is that I've always required "READ $VAR", and that case wasn't updated to cope with arrays.
Genuine bug:
That said your program is going to struggle, since you use A$(N)
rather than what I expect A$[N]
. Also you invoke wend
and swap
, neither of which I support - or have heard of!
(I'll close this issue when READing from DATA into an array works.)
I found that sorting code here: http://www.antonis.de/qbebooks/gwbasman/whilewend.html
Then I added the missing parts to make it work. It works as is with PC-BASIC (https://github.com/robhagemans/pcbasic)
We're hitting conflict because gwbasic is not what I've implemented, this BASIC is closest to ZX Spectrum BASIC - which was simple.
I expect users who wish to port programs will be forced to make changes.
No conflicts, man. I've been suggesting small improvements that would help running GW-BASIC dialects AND would NOT hurt ability to run ZX Spectrum dialect. Of course you would code those enhancements only if you enjoy them. No bad feelings. Cheers.
Can anyone spot the problem causing the error below?