Pragmatic directives: Difference between revisions

Content deleted Content added
m added whitespace before the TOC (table of contents), added a ;Task: (bold) header, added other whitespace to the task's preamble.
Petelomax (talk | contribs)
Line 274: Line 274:


The #ilASM{} directive contains inline assembly, which can contain PE/ELF/32/64 guards to control the exact
The #ilASM{} directive contains inline assembly, which can contain PE/ELF/32/64 guards to control the exact
code emitted (mainly for low-level system routines, such as file I/O, which are usually in builtins\VM).
code emitted.


The with/without directives control several run-time options: <br>
The with/without directives control several run-time options: <br>
profile -- produce an execution count listing <br>
profile -- produce an execution count listing when the program terminates<br>
profile_time -- produce an execution percentage listing <br>
profile_time -- produce an execution percentage listing when the program terminates<br>
type_check -- turn user-defined type checking on or off <br>
type_check -- turn user-defined type checking on or off (can make it noticeably faster, once testing is done)<br>
trace -- allow or disallow debugging (tracing) <br>
trace -- allow or disallow debugging (source code line-by-line tracing) <br>
debug -- turn debugging info generation on or off <br>
debug -- turn debugging info generation on or off <br>


The last two are related: without debug makes all tracing and diagnostics impossible for the following code,
The last two are related: without debug completely removes all tracing and diagnostics for a specific file (primarily intended for use in well-tested system routines), whereas (under with debug, which is the default) with/without trace can make debugging less tedious by not stopping on every line of irrelevant (user-selected) code, although dumps still contain a full call stack.
whereas (under with debug) with/without trace can make debugging less tedious by skipping irrelevant code.


with/without console/gui still work but should now be replaced with a format directive:
with/without console/gui still work but should now be replaced with a format directive: