OWBasic for Pocketviewer

Home INTRO Group RUNTIMEERROR Alphabetical Index

Example for Runtime Error

The example shows, how a program can react on runtime errors:


! read all MEMOs of the category 5
i=0
$m1
 ERROROFF: ! switch error messages off
 LOADMEMO a$,5,i: ! Memo read
 ERRORON: ! switch error messages on
 if error>0 GOTO endlabel : ! No more MEMO there 
 PRINT a$: ! print first line 
 INC i
GOTO m1
$endlabel
PRINT "Finished"


Home INTRO Group RUNTIMEERROR Alphabetical Index