Err

From Liberty BASIC Family
Jump to navigation Jump to search
Supported in Just BASIC Supported in Liberty BASIC Not supported in Liberty BASIC 5 Supported in Run BASIC

Description

When an error occurs, the special variable Err$ will hold the description of the error as a string value. Err (without the dollar sign) holds the numeric value of the error. Some types of errors do not have a numeric representation, in which case Err will be 0 (zero).

Syntax

These variables are case sensitive.

  1. Err
  2. Err$

Hints

Err and Err$ are useful used together with ON ERROR

Example

    ON ERROR GOTO [errorHandler]

        Print 10/0
    End

[errorHandler]
    Print "Err$: ";Err$
    Print "Err: ";Err
    End

Useful Procedures

' Place a useful function or sub using this keyword here