Err

From Liberty BASIC Family
Revision as of 03:04, 11 October 2023 by StPendl (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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