ERL$ function

Purpose

Return the last label, line number, or procedure name executed prior to the most recent error.

Syntax

position$ = ERL$

Remarks

Return a string containing the name of the last (most recent) label, line number, or procedure that was executed prior to the most recent run-time error, within the current Sub, Function, Method, or Property.  In order to maintain high efficiency levels, the returned name is limited to the first 8 characters of the actual name.

See also

ERL, ERR, ERRCLEAR, ERROR, ERROR$, Error  Overview, Error TrappingON ERROR

Example

MyLabel:
ERRCLEAR
NAME "a nonexisting filename.txt" AS "abc.txt"
IF ERR THEN Position$ = ERL$