Err$: Difference between revisions

From Liberty BASIC Family
Jump to navigation Jump to search
m (Text replacement - "Building Blocks Categories" to "Building Blocks")
 
m (1 revision imported)
 

Latest revision as of 03:04, 11 October 2023

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