_ERRORLINE

From QB64 Wiki
Revision as of 02:06, 20 April 2020 by Odin (talk | contribs) (Text replacement - "IDE" to "IDE")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.


Examples

Example: 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



Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page