Table of contents:
Some program syntax or behaviour is available by including a compiler extension. A program using such extensions must use the appropriate mechanism to load them.
The command-line compiler tool, sick, determines which extensions are required from the program suffix: in general, each letter in the suffix enables an extension. Alternatively, if you are not relying on sick's guesses and are specifying a list of preloads yourself, just add -pextension-name to your command line as many times as necessary.
Using the INTERCAL Calculator, INTERCALC, you can add extensions by listing them in the command like (with -oextension-name), or by enabling or disabling them using the Options menu.
Extensions are implemented as special compiler objects, which are designed to run in the context of your program just before the program itself. The kind of things extensions can do is extending the compiler, changing internal registers, or, in some cases, use some undocumented features of the runtime system.
In the following list, the extension name is the one you find in the calculator's Options menu, which is also the name you use on the command line to both sick and intercalc. The letter is the suffix letter which causes loading of the extension.
Name | Letter | Description |
---|---|---|
bitwise-divide | d | Changes the unary division operator to act as a bitwise operator |
come-from-gerund | g | Enables the COME FROM gerund and NEXT FROM gerund statements |
computed-labels | l | Adds syntax for computed statement labels; currently only works with the sick compiler |
next | n | Adds syntax for the NEXT statement; only works with the sick compiler (ick and 1972 do not require it) |
internet | r | Adds syntax and runtime support for the INTERNET |
syscall | s | Adds runtime support for the system call interface |
thick | t | Modifies the default behaviour of COME FROM to enable threads |
trace | Enables program tracing | |
wimp | w | Makes the compiled program default to wimp mode when it runs |
Since CLC-INTERCAL 1.-94.-2, the internet extension is only available if the optional package CLC-INTERCAL-INET has been installed.
When used in a suffix, the letter "t" also changes the default compiler to ick: this is for compatibility with the old thick compiler, or with ick with thread support. Use .clcti as a suffix to use sick with threads.
The trace extension does not correspond to a suffix letter; normally one does not enable tracing at compile time, but rather uses the --trace command-line option when running the program. This option is available in the command-line compiler tool, sick, as well as in all executable programs produced by the compiler. The calculator offers the trace option in its Options menu and in its command line, to allow tracing to be enabled and disabled as required.