10-24-2022, 04:46 PM
Sure there's a difference. _CONTINUE is like a special needs GOTO. It needs a loop. GOTO can go anywhere.
Anyway. To your point about _CONTINUE and error trapping. It doesn't need a line number. Here are two examples in one snippet. The second one addresses the error trapping question. Just press a key after the first demo is done.
Good question!
Pete
Anyway. To your point about _CONTINUE and error trapping. It doesn't need a line number. Here are two examples in one snippet. The second one addresses the error trapping question. Just press a key after the first demo is done.
Code: (Select All)
ON ERROR GOTO resnxt
FOR i = 10 TO -10 STEP -1
IF i MOD 2 THEN _CONTINUE
LOCATE , ABS(i): PRINT i ' Errors when i = 0.
NEXT
SLEEP
LOCATE 15, 10
FOR i = 10 TO -10 STEP -1
IF SCREEN(CSRLIN, POS(0) - (10 - ABS(i))) = 32 THEN _CONTINUE
PRINT "It will not go here. because _CONTINUE skips it even after error."
NEXT
END
resnxt:
BEEP
PRINT "Error"; ERR, "i ="; i,
RESUME NEXT
Good question!
Pete
If eggs are brain food, Biden takes his scrambled.