RETRY Verb
Syntax
RETRY
Description
The RETRY verb causes a branch back to an error-causing statement in order to try again. PRO/5 issues an error if no RETRY information has been saved from a preceding error. See Error Trapping Rules for more information. PRO/5 restores the SETERR value saved at the time of the error and the RETRY information is cleared. If a new SETERR has been executed since the time of the error, RETRY will not restore the old SETERR value.
RETRY is used in conjunction with an error branch (ERR=), similar to how RETURN is used with a GOSUB. However, error branches cannot be nested as can GOSUB/RETURNS.
The RETRY branch address is cleared by the START, LOAD, RUN, BEGIN, CLEAR, RESET, END, and STOP verbs.
RETRY is not permitted in console mode. In a compound statement, only ELSE, FI, or REM can follow RETRY.
Examples
RETRY Example
0010 begin
0020 input (0,err=oops)"Enter a number from 0 to 100: ",n:(100)
0030 print "You entered:",n
0040 stop
0050 oops:
0060 print "Please enter a number from 0 to 100!"
0070 retry
0080 end