BASIC

Using stack in BASIC

2007年9月17日

Apple BASIC doesn't support user-defined function. All variables are therefore global ones. If some variables are used in sub routine (that can be called by GOSUB statement), the variables are of course modified in the sub routine. Following way avoids this problem.

stack

Lines 1010 and 1060 correspond to PUSH and POP commands, respectively.

コメント

コメントはありません

コメント送信