"And yet it was a very clever pudding to invent."
"What did you mean it to be made of?" Alice asked, hoping to cheer him up, for the poor Knight seemed quite low-spirited about it.
"It began with blotting-paper," the Knight answered with a groan.
"That wouldn't be very nice, I'm afraid--"
"Not very nice alone," he interrupted, quite eagerly, "but you've no idea what a difference it makes, mixing it with other things--such as gunpowder and sealing-wax."


10. The C-INTERCAL Compiler

This section describes the use of ick, the C-INTERCAL compiler. Information specific to the other known INTERCAL compilers appears in the following sections. These sections are less useful, since the other compilers are no longer available, but they are retained to provide a sense of history, and because any information regarding INTERCAL is really too scarce to discard.

10.1 Character Set

The C-INTERCAL compiler uses ASCII rather than EBCDIC. We follow the Atari implementation (see section 11) by (a) using big money ($) as the mingle operator in place of change (¢), and (b) using what (?) as the XOR operator in place of bookworm (V<backspace>-). The original forms are still supported, in a manner of speaking: change may be encoded via the Latin-1 character 0xA2, and the trigraph V 0x08 - may be used to represent bookworm.

10.2 Usage and Compilation Options

To compile an INTERCAL program foo.i to executable code, just do

        ick foo.i

There's a -c option that leaves the generated C code in place for inspection (suppressing compilation to machine code), a -d option that enables verbose parse reporting from the yacc/bison parser, a -t option that requires strict INTERCAL-72 compliance (rejecting COME FROM and the extensions for bases other than two), a -b option that disables the random-bug feature (error 774), and an -O option that enables the (hah!) optimizer. Invoking ick -? prints a usage message.

Another compilation switch affects C-INTERCAL's runtime behavior. The -C option forces output in "clockface" mode, for superstitious users who believe writing IV upside-down offends IVPITER and would rather see IIII.

10.3 Runtime Options

Every C-INTERCAL runtime also accepts certain options at runtime. These include [+/-]help, [+/-]traditional, and [+/-]wimpmode. The help option (with either + or -) triggers a "usage" message. The +traditional option is presently a no-op.

Steve explains: "The wimpmode option is the most interesting. I found myself always running my test programs with filters on both ends to work around the 'nifty' INTERCAL number representations. This was so painful that I decided it would be less painful (and a lot less code) if I added a 'wimp' option. With the +wimpmode option, the user is subjected to a humiliating message about what a wimp he or she is to use this mode, but after that is allowed to use conventional numerical notation. While such a mode doubtless violates to some extent the INTERCAL philosophy, the fact that an 'unbutcher' command has been posted clearly indicates the need for it. Anyway ... if you don't like it, don't use it.... the default is -wimpmode (i.e. not wimp mode)."

10.4 PLEASE Politesse Checking

A feature of INTERCAL-72 not documented in the original manual was that it required a certain level of politesse from the programmer. If fewer than 1/5th of the program statements included the PLEASE qualifier, the program would be rejected as insufficiently polite. If more than 1/3rd of them included PLEASE, the program would be rejected as excessively polite.

This check has been implemented in C-INTERCAL. To assist programmers in coping with it, the intercal.el emacs mode included with the distribution randomly expands "do " in entered source to PLEASE DO 1/4th of the time.

10.5 Internationalization

The language recognized by the C-INTERCAL compiler includes several extensions made with an eye to international usage.

Firstly, numerical input is recognized in any of the following languages: English, Sanskrit, Basque, Tagalog, Nahuatl, Georgian, Kwakiutl, and Volapük.

Secondly, the interleave operator, normally written as either change (¢) or big money ($) can instead be written, using the Latin-1 character set, as quid (£) or zlotnik (¤).


[Next]
[Previous]
[Contents]