dmsc / fastbasic

FastBasic - Fast BASIC interpreter for the Atari 8-bit computers
GNU General Public License v2.0
139 stars 20 forks source link

Calling PROCs with array arguments doesn't work #84

Closed std-xl closed 7 months ago

std-xl commented 7 months ago

In FB.COM the following programs dont' work (they crash):

DATA A() BYTE = 1,2,3 EXEC P A(0) PROC P X:?X:ENDP.

DATA A() BYTE = 1,2,3 EXEC P &A PROC P X:?X:ENDP.

But this works:

DATA A() BYTE = 1,2,3 XX=A(0) EXEC P XX PROC P X:?X:ENDP.

So you can't have any array arguments as PROC parameters ?!

dmsc commented 7 months ago

Hi!

The problem was passing DATA arrays to procedures, passing DIM arrays worked ok.

This was fixed in bd3a653fd70d40ca2d12320652023d168ed5ddf6 , two weeks ago :-)

You can try the attached compiled ATR, and report back if there are still problems.

fastbasic.zip

Have Fun!

std-xl commented 7 months ago

Thanks a lot - I'm now using the new ATR image to carry on exploring FastBasic :-)