Code: Select all
IF BASIC_INDEX%("x_%")<0:PRINT#0,"x_% (or y_%) not set! Aborting":END_CMD
IF BASIC_INDEX%("y_%")<0:PRINT#0,"y_% (or x_%) not set! Aborting":END_CMD
IF x_%<0 OR x_%>512:PRINT#0,"x_% must be in range 0..512!":END_CMD:REMark x%=x_%
IF y_%<0 OR y_%>512:Print#0,"y_% must be in range 0..512!":END_CMD:REMark y%=y_%
PRINT#0,"Reset SuperBASIC origin to "&x_%&", "&y_%&"?";
CURSEN#0:a_$=INKEY$(#0,-1):CURDIS#0
IF a_$<>'y'AND a_$<>'Y':PRINT#0,"User abort":END_CMD
PAPER#2,0:PAPER#1,0:PAPER#0,0
BORDER#2,0:BORDER#1,0:BORDER#0,0:CLS#2:CLS#1:CLS#0
WINDOW#2,256,202,x_%,y_%:WINDOW#1,256,202,x_%+256,y_%:WINDOW#0,512,54,x_%,y_%+202
CLS#0:WINDOW#0,512,54,x_%,y_%+202
BORDER#2,1,255:BORDER#1,1,255:BORDER#0,1,255
PAPER#2,7:PAPER#1,2:PAPER#0,0:CLS#2:CLS#1:CLS#0
END_CMD
Must the current (v3.44) version of TurboToolkit be patched with TurboFix to support SBASIC secondary jobs or is it not possible to use BASIC_INDEX% in secondary SBASICs?
Is there a comparable function to test if a variable exists? Unfortunately I cannot use WHEN ERRor in a batch file and I don't want to make it a BASIC program, cause then when moving the SBASIC windows the currently loaded BASIC program will be lost.