2017-10-10 14:55:21 +00:00
|
|
|
The [[ERL]] function returns the closest previous line number before the last error.
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
{{PageSyntax}}
|
2017-10-10 14:55:21 +00:00
|
|
|
: ''lastErrorLine&'' = [[ERL]]
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
{{PageDescription}}
|
|
|
|
* Used in an error handler to report the last line number used before the error.
|
|
|
|
* If the program does not use line numbers, then ERL returns 0.
|
|
|
|
* Use [[_ERRORLINE]] to return the actual code line position of an error in a QB64 program.
|
|
|
|
|
|
|
|
|
2017-10-10 14:55:21 +00:00
|
|
|
{{PageExamples}}
|
2015-08-02 12:12:44 +00:00
|
|
|
''Example:'' Using a fake error code to return the line number position in a program.
|
|
|
|
{{CodeStart}}
|
|
|
|
{{Cl|ON ERROR}} {{Cl|GOTO}} errorfix
|
|
|
|
1
|
|
|
|
{{Cl|ERROR}} 250
|
|
|
|
{{Cl|ERROR}} 250
|
|
|
|
|
|
|
|
5 {{Cl|ERROR}} 250
|
|
|
|
|
|
|
|
{{Cl|END}}
|
|
|
|
errorfix:
|
|
|
|
{{Cl|PRINT}} {{Cl|ERL}}
|
|
|
|
{{Cl|RESUME}} {{Cl|NEXT}} '' ''
|
|
|
|
{{CodeEnd}}
|
|
|
|
{{OutputStart}}1
|
|
|
|
1
|
|
|
|
5
|
|
|
|
{{OutputEnd}}
|
|
|
|
|
|
|
|
|
|
|
|
{{PageSeeAlso}}
|
|
|
|
* [[ERR]]
|
|
|
|
* [[ERROR]]
|
|
|
|
* [[ON ERROR]]
|
2021-01-24 03:36:34 +00:00
|
|
|
* [[_ERRORLINE]], [[_INCLERRORLINE]], [[_INCLERRORFILE$]], [[_ERRORMESSAGE$]]
|
2015-08-02 12:12:44 +00:00
|
|
|
* [[ERROR Codes]]
|
|
|
|
|
|
|
|
|
2019-04-15 01:15:33 +00:00
|
|
|
{{PageNavigation}}
|