' example of catching a divide by zero error

OPTION RaiseMathError sbMathErrDiv

on error goto myerror

n = 1
m = 0
x = n/m

print "the result is: ", x, "\r\n"
stop

myerror:
print "An error occurred\r\n"
print error$, "\r\n"

