996
|
1 <HTML>
|
|
2 <HEAD>
|
|
3 <TITLE>CLC-INTERCAL Reference</TITLE>
|
|
4 </HEAD>
|
|
5 <BODY>
|
|
6 <H1>CLC-INTERCAL Reference</H1>
|
|
7 <H2>... Compiler extensions</H2>
|
|
8
|
|
9 <P>
|
|
10 Table of contents:
|
|
11 <UL>
|
|
12 <LI><A HREF="index.html">Parent directory</A>
|
|
13 <LI><A HREF="#compiling">Compiling a program with extensions</A>
|
|
14 <LI><A HREF="#list">List of available extensions</A>
|
|
15 </UL>
|
|
16 </P>
|
|
17
|
|
18 <H2><A NAME="compiling">Compiling a program with extensions</A></H2>
|
|
19
|
|
20 <P>
|
|
21 Some program syntax or behaviour is available by including a
|
|
22 compiler extension. A program using such extensions must use the
|
|
23 appropriate mechanism to load them.
|
|
24 </P>
|
|
25
|
|
26 <P>
|
|
27 The command-line compiler tool, <I>sick</I>, determines which
|
|
28 extensions are required from the program suffix: in general,
|
|
29 each letter in the suffix enables an extension. Alternatively,
|
|
30 if you are not relying on sick's guesses and are specifying
|
|
31 a list of preloads yourself, just add <I>-pextension-name</I>
|
|
32 to your command line as many times as necessary.
|
|
33 </P>
|
|
34
|
|
35 <P>
|
|
36 Using the INTERCAL Calculator, INTERCALC, you can add extensions
|
|
37 by listing them in the command like (with <I>-oextension-name</I>),
|
|
38 or by enabling or disabling them using the Options menu.
|
|
39 </P>
|
|
40
|
|
41 <P>
|
|
42 Extensions are implemented as special compiler objects, which are
|
|
43 designed to run in the context of your program just before the
|
|
44 program itself. The kind of things extensions can do is extending
|
|
45 the compiler, changing internal registers, or, in some cases,
|
|
46 use some undocumented features of the runtime system.
|
|
47 </P>
|
|
48
|
|
49 <H2><A NAME="list">List of available extensions</A></H2>
|
|
50
|
|
51 <P>
|
|
52 In the following list, the extension name is the one you find in
|
|
53 the calculator's Options menu, which is also the name you use on
|
|
54 the command line to both <I>sick</I> and <I>intercalc</I>. The
|
|
55 letter is the suffix letter which causes loading of the extension.
|
|
56 </P>
|
|
57
|
|
58 <TABLE>
|
|
59 <TR><TH>Name</TH><TH>Letter</TH><TH>Description</TH></TR>
|
|
60 <TR><TD>bitwise-divide</TD><TD>d</TD><TD>Changes the <A HREF="expressions.html#unary">unary division</A> operator to act as a bitwise operator</TD></TR>
|
|
61 <TR><TD>come-from-gerund</TD><TD>g</TD><TD>Enables the <A HREF="statements.html#come_from">COME FROM gerund</A> and <A HREF="statements.html#next_from">NEXT FROM gerund</A> statements</TD></TR>
|
|
62 <TR><TD>computed-labels</TD><TD>l</TD><TD>Adds syntax for computed statement labels; currently only works with the <I>sick</I> compiler</TD></TR>
|
|
63 <TR><TD>next</TD><TD>n</TD><TD>Adds syntax for the NEXT statement; only works with the <I>sick</I> compiler (<I>ick</I> and <I>1972</I> do not require it)</TD></TR>
|
|
64 <TR><TD>internet</TD><TD>r</TD><TD>Adds syntax and runtime support for the <A HREF="internet.html">INTERNET</A></TD></TR>
|
|
65 <TR><TD>syscall</TD><TD>s</TD><TD>Adds runtime support for the <A HREF="syscall.html">system call interface</A></TD></TR>
|
|
66 <TR><TD>thick</TD><TD>t</TD><TD>Modifies the default behaviour of COME FROM to enable threads</TD></TR>
|
|
67 <TR><TD>trace</TD><TD></TD><TD>Enables program tracing</TD></TR>
|
|
68 <TR><TD>wimp</TD><TD>w</TD><TD>Makes the compiled program default to wimp mode when it runs</TD></TR>
|
|
69 </TABLE>
|
|
70
|
|
71 <P>
|
|
72 Since CLC-INTERCAL 1.-94.-2, the <i>internet</i> extension is
|
|
73 only available if the optional package CLC-INTERCAL-INET has
|
|
74 been installed.
|
|
75 </P>
|
|
76
|
|
77 <P>
|
|
78 When used in a suffix, the letter "t" also changes the default
|
|
79 compiler to <I>ick</I>: this is for compatibility with the old
|
|
80 <I>thick</I> compiler, or with <I>ick</I> with thread support. Use
|
|
81 <I>.clcti</I> as a suffix to <I>use</I> sick with threads.
|
|
82 </P>
|
|
83
|
|
84 <P>
|
|
85 The <I>trace</I> extension does not correspond to a suffix letter;
|
|
86 normally one does not enable tracing at compile time, but rather
|
|
87 uses the <I>--trace</I> command-line option when running the
|
|
88 program. This option is available in the command-line compiler
|
|
89 tool, <I>sick</I>, as well as in all executable programs produced
|
|
90 by the compiler. The calculator offers the <I>trace</I> option in
|
|
91 its Options menu and in its command line, to allow tracing to be
|
|
92 enabled and disabled as required.
|
|
93 </P>
|
|
94
|
|
95 </BODY>
|
|
96 </HTML>
|
|
97
|