richpl / PyBasic

Simple interactive BASIC interpreter written in Python
GNU General Public License v3.0
170 stars 46 forks source link

Bug in sample program in README #3

Closed swinslow closed 4 years ago

swinslow commented 4 years ago

One of the sample programs in the README dealing with arrays has an error:

> 10 DIM MYARRAY(2, 2, 2)
> 20 LET MYARRAY(0, 1, 0) = 56
> 30 PRINT A(0, 1, 0)
> RUN
56
> 30 PRINT A(0, 0, 0)
> RUN
Empty array value returned in line 30

The program initializes the array as MYARRAY but then tries to address it with the name A in line 30. I'll submit a PR to fix this.

richpl commented 4 years ago

Good spot, thanks!