QB64.com

QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

The ERL function returns the closest previous line number before the last error.

Syntax

lastErrorLine& = ERL

Description

Example(s)

Using a fake error code to return the line number position in a program.


ON ERROR GOTO errorfix
1
ERROR 250
ERROR 250

5 ERROR 250

END
errorfix:
PRINT ERL
RESUME NEXT 

1
1
5

See Also