bas2tap bug in DEF FN x$()

The place for codemasters or beginners to talk about programming any language for the Spectrum.
Post Reply
C.Born
Manic Miner
Posts: 233
Joined: Sat Dec 09, 2017 4:09 pm

bas2tap bug in DEF FN x$()

Post 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
User avatar
patters
Manic Miner
Posts: 471
Joined: Thu Apr 11, 2019 1:06 am

Re: bas2tap bug in DEF FN x$()

Post by patters »

In my experience zmakebas is much better than bas2tap.
Post Reply