Menu

With v: 2.0.3: statement: ON <exp> GOSUB line#, line#, ... gives SYNTAX ERROR

2021-08-07
2021-08-11
  • Ronald Herrera

    Ronald Herrera - 2021-08-07

    Hi, long time:
    If the value of the expression higher than the quantities of the line numbers after GOSUB,
    a SYNTAX ERROR occurs:

    10 A = 3
    20 ON A GOSUB 30, 40: END
    30 PRINT "1": RETURN
    40 PRINT "2": RETURN

     
    • Marc 'BlackJack' Rintsch

      I can confirm this and that GW-BASIC doesn't do this. The program just ends there.

      Maybe this would be better a bug report over at the Github repository: https://github.com/robhagemans/pcbasic/issues

       
  • Rob Hagemans

    Rob Hagemans - 2021-08-11

    Thanks for the report, added to th bug tracker here: https://github.com/robhagemans/pcbasic/issues/139

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.