1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-20 19:45:15 +00:00
qb64/internal/help/ERROR.txt
Luke Ceddia b586eafd3b Integrated _BLINEINPUT into regular LINE INPUT for BINARY files
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.
2014-07-27 00:06:17 +10:00

39 lines
1.1 KiB
Plaintext

The '''ERROR''' statement is used to simulate a program error or to troubleshoot error handling procedures.
{{PageSyntax}}
:: ERROR code
* Can be used to test an error handling routine by simulating an error.
* Error code 97 can be used to invoke the error handler for your own use, no real error in the program will trigger error 97.
* Use error codes between 100 and 200 for custom program errors that will not be responded to by QB64.
''Example:'' Creating custom error codes for a program that can be handled by an [[ON ERROR]] handling routine.
{{CodeStart}} '' ''
{{Cl|ON ERROR}} {{Cl|GOTO}} handler
{{Cl|IF...THEN|IF}} x = 0 {{Cl|THEN}} {{Cl|ERROR}} 123
x = x + 1
{{Cl|IF...THEN|IF}} x {{Cl|THEN}} {{Cl|ERROR}} 111
{{Cl|END}}
handler:
{{Cl|PRINT}} {{Cl|ERR}}, {{Cl|_ERRORLINE}}
{{Cl|BEEP}}
{{Cl|RESUME}} {{Cl|NEXT}} '' ''
{{CodeEnd}}
: '''Note: Don't use error codes under 97 or over 200 as QB64 may respond to those errors and interrupt the program!'''
''See also:''
*[[ON ERROR]]
*[[ERR]], [[ERL]]
*[[_ERRORLINE]]
*[[ERROR Codes]] (list)
{{PageNavigation}}