For
IF INSTR(string$,substring$)+1 THEN...
better to have
IF INSTR(string$,substring$)<0 THEN...
WHILE ... WEND
WHILE condition 'if condition is 0, jump past WEND 'Code to run WEND 'jump to WHILEThe same thing, but written using IF and GOTO:
@LOOP IF condition==0 THEN GOTO @EXIT 'Code GOTO @LOOP @EXIT
REPEAT ... UNTIL
REPEAT 'code UNTIL condition 'if condition is 0, jump to REPEATGOTO equivalent:
@LOOP 'code IF condition==0 THEN GOTO @LOOP
Examples
Infinite loop:WHILE 1 'code WENDWait for key press:
REPEAT KEY$=INKEY$() UNTIL KEY$!="" ?KEY$