Saturday, November 26, 2022

🪲 Subroutine invocation without the CALL statement

I added some code to wwwBASIC very early this year to overcome a problem in wwwBASIC, and wound up unwittingly breaking wwwBASIC's code that allows a subroutine to be invoked without using the CALL statement.

It took some digging to figure out that wwwBASIC does some token readjustments when a subroutine is invoked without the CALL statement.

Without getting into the weeds, here are the (now working again) options for invoking a subroutine:

Branch to Subroutine Syntax

With CALL

With parameters:

CALL subroutine_name( expr , expr🔁 )

Without parameters:

CALL subroutine_name

Without CALL

With parameters:

subroutine_name( expr , expr🔁 )

Without parameters:

subroutine_name


No comments:

Post a Comment

📚 Simulating OOP Methods in BAM Using GOSUB

BASIC Anywhere Machine's GOSUB implementation allows using numeric expressions for dynamic line numbers or using string expressions for ...