"My name is Alice, so please your Majesty," said Alice very politely; but she added, to herself, "Why, they're only a pack of cards, after all. I needn't be afraid of them!"
The Princeton compiler, written in SPITBOL (a variant of SNOBOL), performs the compilation in two stages. First the INTERCAL source is converted into SPITBOL source, then the latter is compiled and executed.
It should be noted that the Princeton compiler fails to properly interpret certain multiply-subscripted expressions, such as:
",1SUB",2SUB#1"#2"
This is not a "bug". Being documented, it is merely a "restriction". Such cases may be resolved by alternating sparks and ears in various levels of expression nesting:
",1SUB',2SUB#1'#2"
which is advisable in any case, since INTERCAL expressions are unreadable enough as is.
Since there is currently no catalogued procedure for invoking the compiler, the user must include the in-line procedure shown on the following page in his job before the compilation step. Copies of this in-line procedure may be obtained at any keypunch if the proper keys are struck.
The compiler is then executed in the usual manner:
// EXEC INTERCAL[,PARM='parameters'] //COMPILE.SYSIN DD * {INTERCAL source deck} /* //EXECUTE.SYSWRITE DD * {input data} /*
The various parameters are described following the in-line procedure. At most one parameter from each set may apply to a given compilation; if more than one are specified, the results are undefined, and may vary depending upon the particular set of options. The default parameters are in bold.
//INTERCAL PROC //COMPILE EXEC PGM=INTERCAL //STEPLIB DD DSN=U.INTERCAL.LIBRARY,DISP=SHR // DD DSN=SYS1.FORTLIB,DISP=SHR //SYSPRINT DD SYSOUT=A,DCB=(BLKSIZE=992,LRECL=137,RECFM=VBA) //SYSPUNCH DD DUMMY //SCRATCH DD DSN=&COMPSET,UNIT=SYSDA,SPACE=(CYL,(3,1)),DISP=(,PASS) //EXECUTE EXEC PGM=EXECUTE,COND=(4,LT) //SOURCES DD DSN=U.INTERCAL.SOURCES,DISP=SHR * //STEPLIB DD DSN=U.INTERCAL.LIBRARY,DISP=SHR // DD DSN=SYS5.SPITLIB,DISP=SHR // DD DSN=SYS1.FORTLIB,DISP=SHR //SYSIN DD DSN=&COMPSET,DISP=(OLD,DELETE) //SYSOBJ DD SYSOUT=B,DCB=(BLKSIZE=80,LRECL=80,RECFM=F) //SYSPRINT DD SYSOUT=A,DCB=(BLKSIZE=992,LRECL=137,RECFM=VBA) //SYSPUNCH DD DUMMY // PEND
Figure 3. Inline procedure for using INTERCAL.
OPT
NOOPT
In the default mode, the compiler will print a list of all options in
effect, including the defaults for unspecified parameter groups and
the effective option for those sets where one was specified. If
NOOPT is requested, it causes the default mode to be
assumed.
OPTSUB
NOOPTSUB
NOSUB
Unless NOOPTSUB is requested, the System Library is
optimized, resulting in much more rapid processing of function calls.
Specifying NOOPTSUB causes the non-optimized INTERCAL
code shown in section 8.3 to be used, whereas
NOSUB requests that the System Library be omitted
altogether.
IAMBIC
PROSE
The IAMBIC parameter permits the programmer to use poetic
license and thus write in verse. If the reader does not believe it
possible to write verse in INTERCAL, he should send the authors a
stamped, self-addressed envelope, along with any INTERCAL program, and
they will provide one which is verse.
FORMAT
NOFORMAT
In FORMAT mode, each statement printed is put on a
separate line (or lines). In NOFORMAT mode, the
free-format source is printed exactly as input. In this latter case,
statement numbers are provided only for the first statement on a card,
and they may be only approximate. Also, unrecognizable statements are
not flagged.
SEQ
NOSEQ
If the source deck has sequence numbers in columns 73 through 80,
specifying SEQ will cause them to be ignored.
SOURCE
NOSOURCE
If NOSOURCE is selected, all source listing is suppressed.
LIST
NOLIST
If LIST is specified, the compiler will provide a list of
statement numbers catalogued according to type of statement. The
compiler uses this table to perform abstentions by gerund.
WIDTH=nn
This sets the width (in number of characters) of the output line for
FORMAT mode output. The default is 132.
CODE
NOCODE
Include CODE in the parameter list to obtain a listing of
the SPITBOL code produced for each INTERCAL statement.
LINES=nn
This determines the number of lines per page, during both compilation
and execution. The default is 60.
DECK
NODECK
Selecting DECK will cause the compiler to punch out a
SPITBOL object deck which may then be run without reinvoking the
INTERCAL (or SPITBOL) compiler.
KIDDING
NOKIDDING
Select NOKIDDING to eliminate the snide remarks which
ordinarily accompany INTERCAL error messages.
GO
NOGO
Specifying NOGO will cause the program to be compiled but
not executed. EXECUTE/NOEXECUTE may be
substituted for GO/NOGO, but this will
result in an error, and GO will be assumed.
BUG
NOBUG
Under the default, there is a fixed probability of a fatal compiler
bug being worked at random into the program being compiled.
Encountering this bug during execution results in error message 774
(section 9.2). This probability is reduced
to zero under NOBUG. This does not affect the
probability (presumably negligible) of error message 778.
There are no other INTERCAL compilers. **
//NOOPTPFX DD DSN=U.INTERCAL.SOURCES(NOOPTPFX),DISP=SHR //NOOPTSUB DD DSN=U.INTERCAL.SOURCES(NOOPTSUB),DISP=SHR //OPTPFX DD DSN=U.INTERCAL.SOURCES(OPTPFX),DISP=SHR //OPTSUB DD DSN=U.INTERCAL.SOURCES(OPTSUB),DISP=SHR //PRELIM DD DSN=U.INTERCAL.SOURCES(PRELIM),DISP=SHR
** This assertion, from the INTERCAL-72 manual, is now blatantly contradicted by the previous two sections. So, you expect compiler manuals to be consistent?