$CHECKING: Difference between revisions
Jump to navigation
Jump to search
Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link
m (Protected "$CHECKING" ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))) |
No edit summary |
||
(10 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
{{PageSyntax}} | {{PageSyntax}} | ||
: [[$CHECKING]]:{ON|OFF} | : [[$CHECKING]]:{ON|OFF} | ||
{{PageDescription}} | {{PageDescription}} | ||
* The Metacommand does '''not''' require a comment or REM before it. There is no space after the colon. | * The Metacommand does '''not''' require a comment or REM before it. There is no space after the colon. | ||
* The OFF action turns event checking off and should '''only be used when running stable, errorless code.''' | * The OFF action turns event checking off and should '''only be used when running stable, errorless code.''' | ||
* The default [[$CHECKING]]:ON action is only required when checking has been turned OFF previously. | * The default [[$CHECKING]]:ON action is only required when checking has been turned OFF previously. | ||
* When [[$CHECKING]]:OFF is used, all error code and the reporting code is removed from the EXE program. | * When [[$CHECKING]]:OFF is used, all error code and the reporting code is removed from the EXE program. | ||
* '''Warning: Turning OFF error checking could create a General Protection Fault (or segfault). Use only with 100% stable sections of code.''' | * '''Warning: Turning OFF error checking could create a General Protection Fault (or segfault). Use only with 100% stable sections of code.''' | ||
===Details=== | === Details === | ||
* After every QB64 command is translated to C++, the compiler adds special code sections to check for [[ON TIMER (n)]] events and errors that may have occured in the last function call. Disabling error checking with the [[$CHECKING]]:OFF directive prevents the compiler from adding the extra code sections. | * After every QB64 command is translated to C++, the compiler adds special code sections to check for [[ON TIMER(n)]] events and errors that may have occured in the last function call. Disabling error checking with the [[$CHECKING]]:OFF directive prevents the compiler from adding the extra code sections. | ||
* Setting [[$CHECKING]]:OFF is only designed for 100% stable, errorless sections of code, where every CPU cycle saved counts, such as in a software 3D texture mapper, for example. | * Setting [[$CHECKING]]:OFF is only designed for 100% stable, errorless sections of code, where every CPU cycle saved counts, such as in a software 3D texture mapper, for example. | ||
Latest revision as of 16:53, 24 February 2023
The $CHECKING metacommand turns C++ event checking ON or OFF.
Syntax
- $CHECKING:{ON|OFF}
Description
- The Metacommand does not require a comment or REM before it. There is no space after the colon.
- The OFF action turns event checking off and should only be used when running stable, errorless code.
- The default $CHECKING:ON action is only required when checking has been turned OFF previously.
- When $CHECKING:OFF is used, all error code and the reporting code is removed from the EXE program.
- Warning: Turning OFF error checking could create a General Protection Fault (or segfault). Use only with 100% stable sections of code.
Details
- After every QB64 command is translated to C++, the compiler adds special code sections to check for ON TIMER(n) events and errors that may have occured in the last function call. Disabling error checking with the $CHECKING:OFF directive prevents the compiler from adding the extra code sections.
- Setting $CHECKING:OFF is only designed for 100% stable, errorless sections of code, where every CPU cycle saved counts, such as in a software 3D texture mapper, for example.
See also