1
1
Fork 0
mirror of https://github.com/DualBrain/QB64.git synced 2023-11-19 13:10:13 +00:00
QB64-website/wiki/_ERRORLINE.md
2022-12-24 21:14:48 -06:00

898 B

The _ERRORLINE function returns the source code line number that caused the most recent runtime error.

Syntax

e% = _ERRORLINE

Description

  • Used in program error troubleshooting.
  • Does not require that the program use line numbers as it counts the actual lines of code.
  • The code line can be found using the QB64 IDE (Use the shortcut Ctrl+G to go to a specific line) or any other text editor such as Notepad.

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