BrightSign HD2000 BrightScript Reference Guide User Manual

Page 29

Advertising
background image

29

ERR

Similar to ERL, except ERR returns a value related to the code of the error rather than the line in which the
error occurred. Commonly used inside an error handling routine accessed by an ON ERROR GOTO
statement.

ERR/2+1 = true error code (true error code -1)*2=ERR

Example Program

10 ON ERROR GOTO 1000
20 DIM A(15): I=1
30 READ A(1)
40 I=I+1: GOTO 30
50 REM REST OF PROGRAM
100 DATA 2,3,5,7,1,13
999 END
1000 IF ERR/2+1=4 RESUME 50
1010 ON ERROR GOTO 0

Note line 1000: 4 is the error code for Out of Data.


Advertising
This manual is related to the following products: