Liberty BASIC Help Online

RESUME
RESUME
 
Description:
The RESUME command can be used to attempt a retry when an error is handled using the ON ERROR GOTO statement.  There is no way to specify an alternative
 
If the error is handled in a sub or function, RESUME must be attempted before the sub or function ends or else you will get an error when attempting to RESUME.
 
Usage:
 
'demonstrate the use of RESUME
    on error goto [whoops]
    global divideBy
    call causeWhoops
    end
 
[whoops]
    print "whoops!"
    print "Error "; Err$; " "; " code "; Err
    divideBy = 2
    resume
 
sub causeWhoops
    print 10 / divideBy
end sub
 


Copyright (C) 2003 Shoptalk Systems
Liberty BASIC - http://www.libertybasic.com/