mirror of
https://github.com/QB64Official/qb64.git
synced 2024-09-16 03:54:01 +00:00
b586eafd3b
LINE INPUT will now use the faster method if passed a file handle that has been opened FOR BINARY. As such, the _BLINEINPUT command has been removed. qb64.bas now takes advantage of this for reading from '$include files, at least in Include Manager 1. Some tweaking of internal/source/main.txt was required to get things into a sane state, so I'm holing off changing the compiler any further so the auto-builder can make sure everything's smoothed over. Note: Everything should still compile as normal; I'm just being overcautious.
42 lines
No EOL
824 B
Text
42 lines
No EOL
824 B
Text
The {{KW|ERL}} function returns the closest previous line number before the last error.
|
|
|
|
|
|
{{PageSyntax}}
|
|
:''result&'' = {{KW|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.
|
|
|
|
|
|
''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]]
|
|
* [[ERROR Codes]]
|
|
|
|
|
|
{{PageNavigation}} |