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 _ERRORLINE function returns the source code line number that caused the most recent runtime error.

Syntax

e% = _ERRORLINE

Description

Example(s)

Displaying the current program line using a simulated ERROR code.


ON ERROR GOTO DebugLine 'can't use GOSUB 

ERROR 250 'simulated error code 

END 
DebugLine: 
PRINT _ERRORLINE 
RESUME NEXT 

See Also