qb45advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
RESUME Statement Programming Example
  QuickSCREEN      Details     Example      Contents      Index
──────────────────────────────────────────────────────────────────────────────
RESUME Statement Programming Example
 
This example has an error-handling routine starting at line 900 which
traps negative arguments to the SQR function.
 
5 CLS
10 ON ERROR GOTO 900
20 FOR I = 4 TO -2 STEP -1
30     PRINT I, 1 - SQR(I)
40 NEXT
50 END
 
900 'Error-handling routine
910     PRINT "No negative arguments"
920 RESUME NEXT
 
Sample Output
 
4      -1
3      -.7320509
2      -.4142136
1       0
0       1
-1      No negative arguments
-2      No negative arguments