GOTO_CONSTRAINT=0 (goto any label)
GOTO_CONSTRAINT=1 (goto any label in a SRT)
GOTO_CONSTRAINT=2 (no goto's allowed)
The default would be 0 for backward compatibility.
Value 1 would allow things like early exits from SRTs and looping structures within a SRTs or a macro.
Value 2 would be for purists.
If GOTO_CONSTRAINT=1 or 2, the interpreter could assume the script is structured and that once in a SRT the code would never leave the SRT without going to END>.
Examples of what would be allowed with Value 1.
Code: Select all
Label>Start
if>%parm%=1
//allowed
GoTo>TheVeryEnd
endif
SRT>SUBBY
Let>EndSub=END_SUBBY
if>%parm%=2
//allowed
GoTo>%EndSub%
endif
//not allowed
GoTo>TheVeryEnd
//not allowed
GoTo>MIDSUBBY2
GoSub>SUBBY2
Label>END_SUBBY
END>SUBBY
SRT>SUBBY2
Label>MIDSUBBY2
//not allowed
GoTo>END_SUBBY
//allowed
GoTo>MIDSUBBY2
END>SUBBY2
if>%parm%=3
//allowed
GoTo>Start
endif
Label>TheVeryEnd
http://www.mjtnet.com/usergroup/viewtopic.php?t=5350