mirror of
https://github.com/QB64Official/qb64.git
synced 2024-09-28 11:17:47 +00:00
37 lines
981 B
Text
37 lines
981 B
Text
{{DISPLAYTITLE:_ERRORLINE}}
|
|
The [[_ERRORLINE]] function returns the source code line number that caused the most recent runtime error.
|
|
|
|
|
|
{{PageSyntax}}
|
|
:{{Parameter|e%}} = [[_ERRORLINE]]
|
|
|
|
|
|
{{PageDescription}}
|
|
* 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.
|
|
|
|
|
|
{{PageExamples}}
|
|
''Example:'' Displaying the current program line using a simulated [[ERROR]] code.
|
|
{{CodeStart}} '' ''
|
|
{{Cl|ON ERROR}} {{Cl|GOTO}} DebugLine 'can't use {{Cl|GOSUB}}
|
|
|
|
{{Cl|ERROR}} 250 'simulated error code
|
|
|
|
{{Cl|END}}
|
|
DebugLine:
|
|
{{Cl|PRINT}} {{Cl|_ERRORLINE}}
|
|
{{Cl|RESUME}} {{Cl|NEXT}} '' ''
|
|
{{CodeEnd}}
|
|
|
|
|
|
{{PageSeeAlso}}
|
|
* [[ON ERROR]]
|
|
* [[_INCLERRORLINE]], [[_INCLERRORFILE$]], [[_ERRORMESSAGE$]]
|
|
* [[ERR]], [[ERL]]
|
|
* [[ERROR]]
|
|
* [[ERROR Codes]]
|
|
|
|
|
|
{{PageNavigation}}
|