Some time ago, we were discussing Sam bugs. I have just remembered two.
1. RESTORE does not seem to work unless you use a line number.
"RESTORE:READ A" usually says "Statement end error" or some other
weird error.
2. Storing the address of the FOR statement within a variable might be a
good speed-up, but it is rather unstable. Consider:
100 FOR i=1 TO 10
110 KEYIN STR$ i+" REM test"
120 NEXT i
I have once written a loop (probably similar to the above, but I can't
remember) which went on forever because the Sam kept re-executing the
FOR instruction and resetting the control variable.
I haven't tested the following, but would be interested to know whether
they work:
the following line typed as a command.
LET a$="": FOR x=1 TO 100: LET a$=a$+"blah blah": PRINT x: NEXT x
opening up some space _before_ the BASIC program and then loading
a program which is just up to a "NEXT x" instruction.
merging two programs containing control variables and then trying to
NEXT one of them. :-)
imc