skx / gobasic

A BASIC interpreter written in golang.
https://blog.steve.fi/tags/basic/
GNU General Public License v2.0
328 stars 27 forks source link

Support arrays .. #75

Closed skx closed 5 years ago

skx commented 5 years ago

We should support one and two-dimensional arrays:

    10 DIM a(10)
    20 LET a[3] = 3
    30 LET a[4] = "steve"
    40 LET a[0] = "steve"
    50 LET a[5] = "steve"
    60 FOR I = 0 TO 9
    70   PRINT I, a[I], "\n"
    80 NEXT I