1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-29 12:50:37 +00:00
QB64-PE/internal/help/ERL.txt
SteveMcNeill 33adc04fc4 Add temp folder to repo. It's necessary as well!
Just more initial setting on... nothing much to see here.
2022-04-28 13:39:56 -04:00

45 lines
887 B
Plaintext

The [[ERL]] function returns the closest previous line number before the last error.
{{PageSyntax}}
: ''lastErrorLine&'' = [[ERL]]
{{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.
{{PageExamples}}
''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]]
* [[_ERRORLINE]], [[_INCLERRORLINE]], [[_INCLERRORFILE$]]
* [[ERROR Codes]]
{{PageNavigation}}
<