davidgiven / ack

The Amsterdam Compiler Kit
http://tack.sf.net
Other
421 stars 60 forks source link

Basic: read out of data issue #255

Open cjacker opened 2 years ago

cjacker commented 2 years ago

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
davidgiven commented 2 years ago

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?