Page 1 of 1

bas2tap bug in DEF FN x$()

Posted: Sat Mar 23, 2024 3:31 pm
by C.Born
Hi
i have a piece off basic on which bas2tap fails

Code: Select all

  10 DEF FN D$(a)="HALLO"
  20 PRINT FN D$()
  30 LET e$=FN d$()
it gives an error

Code: Select all

Desktop/zx/zx/gigaflip$ ./bas2tap DEFtest.bas DEFtest.tap

BAS2TAP v2.6 by Martijn van der Heide of ThunderWare Research Center

Creating output file DEFtest.tap
ERROR in line 30, statement 1 - Bad assignment expression type
Listing as far as done contains 2 lines.

if i change 'e$' into 'e' it works, but thats an actual error, then a NUMBERvar get a STRINGvar assigned ??
BTW i think that line 10 should be able to be
10 DEF FN D$()="HALLO"
without a defined variable in the naming structure like
DEF FN r()=12345
DEF FN r$()="12345"
which both works, but NOT in bas2tap, which INSIST on a variable inside the naming

Code: Select all

/Desktop/zx/zx/gigaflip$ ./bas2tap DEFtest.bas DEFtest.tap

BAS2TAP v2.6 by Martijn van der Heide of ThunderWare Research Center

Creating output file DEFtest.tap
ERROR in line 10, statement 1 - Expected variable, but got "(null)"
Listing as far as done contains 0 lines.
thats TWO bugs in one token handeling
pitty, since i need this functionality

txt2emu has NO problems
i have to test zmakebas for this

Re: bas2tap bug in DEF FN x$()

Posted: Sat Mar 23, 2024 4:00 pm
by patters
In my experience zmakebas is much better than bas2tap.