Errno (Function)

Gets the error class during exception handling.

Errno 

Parameters
None.

Return Value
Returns the value of the integer.
The content of the value is the Error No. that is fetched.

Description
Gets the Error No. when a Macro Error occurs.
The respective Macro Error error numbers are listed below.
Error No.
1
NEXT without FOR
2
Syntax error
3
RETURN without GOSUB
5
Illegal function call
6
Overflow
7
Out of memory
8
Undefined line number
9
Subscript out of range
11
Division by Zero
13
Type missmatch0
15
String too long
18
Undefined array
23
Line buffer overflow
26
FOR without NEXT
32
Undefined label
121
CASE without SELECT
122
END SELECT without SELECT
123
SELECT without END SELECT
124
CASE without END SELECT
125
ELSEIF without IF
126
ELSE without IF
127
ENDIF without IF
128
IF without ENDIF
129
ELSEIF without ENDIF
130
ELSE without ENDIF
135
DO without LOOP
136
LOOP without DO
140
EXIT without FOR
141
EXIT without DO
This is used between the catch - end try of try - catch - end try.

Example
Writing data to a file.
*DATAWRITE

    Try
        Open "/C0/DATA.DAT" for OUTPUT as #1
        Print #1, DATA$
        Close
    Catch

        ' In the case where the error is generated by the "open" command.

        If ERRCMND$ = "Open" Then
        print "Unable to open file"

        ' In the case where the error is generated by the "print" command.

        Elseif ERRCMND$ = "Print" Then
        Close
        print "Writing failed"
        Endif
    End try

Return