Pragmatic directives: Difference between revisions

(Added PureBasic)
 
(3 intermediate revisions by 2 users not shown)
Line 448:
}
</syntaxhighlight>
 
=={{header|jq}}==
 
'''Works with jq, the C implementation of jq'''
 
'''Works with gojq, the Go implementation of jq'''
 
jq supports directives for including or importing a jq module, as exemplified by:
<pre>
include "m" {"search": "."};
</pre>
 
In this example, the module "m.jq" in the present working directory would be "transcluded" as if by inlining the contents of the file m.jq.
The "search" key specifies a pathname or array of pathnames to be searched.
 
Note that the JSON object that may be specified in an "include" directive must be a constant.
 
=={{header|Julia}}==
Line 638 ⟶ 654:
trace -- allow or disallow debugging (source code line-by-line tracing) <br>
debug -- turn debugging info generation on or off <br>
nested_globals -- fine-grained scope control, nested_locals is the complementary option <br>
 
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. Some other options, specifically indirect_includes, inline, and digital stamps, exist solely for compatability and are completely ignored.
Line 726 ⟶ 743:
 
=={{header|PureBasic}}==
PureBasic supports several pragmatic directives, also known as '''[https://www.purebasic.com/documentation/reference/compilerdirectives.html compiler directives]'''.
 
<code>CompilerIf…CompilerElseIf…CompilerElse…CompilerEndIf</code>: allows certain parts of the code to be compiled depending on the evaluation of a constant expression.
2,504

edits