dmsc / fastbasic

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

Subroutines with local variables #54

Open SteveB69 opened 2 years ago

SteveB69 commented 2 years ago

Hi,

would it be possible to create some kind of local variables for subroutines?

In order to write new games for the Atari I would first create some generic routines, which should not depend on global variables and, most important, not accidently change the value of global variables. Just think of the magic "i" variable used for every other loop.

Therefore it would also be helpful to have the valued returned to the caller when a parameter is changed in the subroutine, i.e. call by value/result or call be reference.

Thank you Steve