HELP COMPILE                                      Fran Evelyn, July 985

    compile(<character-repeater | word | string | device>)

COMPILE takes one argument. This can be:

1) A character repeater. If this is the case, the stream of characters
returned by the repeater is compiled until the terminator character
*TERMIN is produced. Thus:

    compile(charin);

will cause input to be compiled from the user's terminal until the user
types the "end of file" character (<CTRL> D on Unix machines; <CTRL> Z
on VMS).

2) A word or a string. If this is the case, the word or string is taken
to be a file name and the specified file is compiled (by first applying
*DISCIN to the file name to produce a character repeater). If the
argument is a word, DISCIN appends the string POP_DEFAULT_TYPE to create
a string. E.g. given the word "foo" it might create the file name
'foo.p', 'foo.pl', 'foo.lsp' or 'foo.ml' depending on the value of
POP_DEFAULT_TYPE.

3) A *DEVICE. If this is the case, DISCIN is called to produce a
character repeater for the device, and the resulting input stream is
compiled.

During a call of COMPILE, the variable *CUCHARIN holds the character
repeater currently being compiled. Once the character repeater has been
obtained, COMPILE need only do:

    popval(pdtolist(incharitem(cucharin)));

to  compile the file (or whatever).

If the *PDPROPS of CUCHARIN is a string, then that string is assumed to
be the name of the file being compiled, and assigned by COMPILE to the
variable POPFILENAME. This file name is displayed if a *MISHAP occurs
while compiling the file. DISCIN ensures that the PDPROPS of the
character repeater it returns is the name of the appropriate file.


See also:

HELP * INCHARITEM - converts character repeater into item repeater
HELP * POPVAL     - to compile the items in a list
HELP * PDTOLIST   - on constructing dynamic lists
HELP * CHARIN     - character repeater procedure
HELP * LOAD       - more convenient syntax for interactive compilation
REF  * CHARIO     - character repeaters, consumers, etc.
REF  * POP_DEFAULT_TYPE
REF  * POPCOMPILE - detailed analysis of compilation in POP11
REF  * PROGLIST   - Info on PROGLIST and item-reading procedures
REF  * ITEMISE    - for information on the POP11 itemiser
REF  * LIBRARY    - library mechanisms, autoloading, etc.
HELP * AUTOLOAD   - autoloadable libraries

--- C.all/help/compile
--- Copyright University of Sussex 1990. All rights reserved. ----------
