ack icon indicating copy to clipboard operation
ack copied to clipboard

Basic: read out of data issue

Open cjacker opened this issue 2 years ago • 1 comments

Consider below basic code:

' test.bas
10 read x
20 read y
30 data 2, 3
40 print x, y

Build with:

ack -O test.bas -o test
./test

the output is:

LINE 20:ERROR 2: Out of data

expect output should be:

2 3

cjacker avatar Jun 27 '22 15:06 cjacker

Gosh, the Basic compiler! That's... obscure...

The Basic dialect is pretty weird. Looking at the documentation (http://tack.sourceforge.net/olddocs/basic.html#2.3.%20DATA) it appears that DATA values are written to an external file which then needs to be accessible at run time --- is it?

davidgiven avatar Jul 01 '22 12:07 davidgiven