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. 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. In the following example, if the value of C is zero, PRO/5 issues an error:


If the value of C was fixed by an error handling routine, and a RETRY was executed, the RETRY would cause the entire statement to be executed again. The variable, A, would be incremented twice.

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.


1000 RETRY

See Also

Verbs - Alphabetical Listing


Copyright BASIS International Ltd. BBj®, Visual PRO/5®, PRO/5®, and BBx® are registered trademarks.