[next] [previous] [contents]

  16.2.3.1 RETRY Statement
  You use the RETRY statement to clear the error and to exe-
  cute the statement again that caused the error again. Be sure
  to take corrective action before trying the protected statement
  again. For example:
  DECLARE REAL radius
  WHEN ERROR USE fix_it
          INPUT "Please supply the radius of the circle"; radius
  END WHEN
  HANDLER fix_it
          !trap overflow error
          IF ERR = 48
          PRINT "Please supply a smaller radius"
          RETRY
  END HANDLER
  PRINT "The circumference of the circle is "; 2*PI*radius

  In FOR...NEXT loops, if the error occurs while BASIC is
  evaluating the limit or increment values, RETRY reexe-
  cutes the FOR statement; if the error occurs while BASIC is
  evaluating the index variable, RETRY reexecutes the NEXT
  statement. In UNTIL...NEXT and WHILE...NEXT loops,
  if the error occurs while BASIC is evaluating the relational
  expression, RETRY reexecutes the NEXT statement.