BASIC
| Jeans & Development | 電子ブロック工房 | 三日坊主 | フロントページ |
Using stack in BASIC [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.

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

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