We're not dealing with true SB recursion here as these are not true functions. These are just recursive pieces of QB45 code which have their own scope (remember the "p" bug?). I strongly doubt Peter would go that far in his implementation of this ancient BASIC functionality. I certainly didn't. Neither did Charles, to the best of my knowledge. thinBasic doesn't have all this GoTo/GoSub mess at all.
SB is pretty smart with its stack management allowing to jump out of a FOR/NEXT, GOSUB, ... with a GOTO and SB takes care of popping the stack.
You may want to look at the MakeNumber routine. I think SB has a POW function and I'm not sure if the
^ QB syntax is working correctly. (my guess)
. QB45's NOT FALSE evaluates to -1. You can check it with PRINT. QB45 doesn't define the FALSE and TRUE constants internally.
Since SB's TRUE/FALSE are built in constants (F=0 T=-1) and the QBLisp program is using variables, I think the NOT(FALSE) means (F=0 T=anything not zero)
Also be aware that SB has
INT and
FIX which are similar but handles rounding differently. (up/dn)
Does SB compares need to be case insensitive? (INSTR, IF a$ = b$ THEN , ...) If
YES we need to enable that SB option in SBlisp.