Department of Computer
Science The University of Arizona Tucson, Arizona IPD256c March 18, 1996 http://www.cs.arizona.edu/icon/docs/ipd256.htm |
.icn
. The
Icon translator, icont
, produces an "icode" file
that is executable. An Icon program in the file prog.icn
is
translated by
The .icn suffix is optional, soicont prog.icn
can be used instead.icont prog
prog
(with no suffix).
This file can be run by
Alternatively,prog
icont
can be instructed to execute the icode
file after translation by appending -x
to the command line,
as
Ificont prog -x
icont
is run with the -x
option, the file icode
prog
is left and can be run subsequently as described above.icont
translator can accept several Icon source files at
one time. When several files are given, they are translated and combined
into a single icode file whose name is derived from the name of the first
file. For example,
translates the filesicont prog1 prog2
prog1.icn
and prog2.icn
and
produces one icode file, prog1
.-o
option, followed by the desired
name. For example,
produces an icode file namedicont -o probe prog
probe
rather than prog
.-c
option is given to icon
t, the translator
stops before producing an icode file, and intermediate "ucode"
files with the extensions .u1
and .u2
are left
for future use (normally they are deleted). For example,
leavesicont -c prog1
prog1.u1
and prog1.u2
, instead of producing
prog1
. These ucode files can be used in a subsequent icont
command by using the .u1
name. This saves translation time
subsequently. For example,
translatesicont prog2 prog1.u1
prog2.icn
and combines the result with the ucode
files from a previous translation of prog1.icn
. Note that only
the .u1
name is given; the corresponding .u2
name
is implied. The extension can be abbreviated to .u
, as in
Ucode files also can be added to a program using link declarations.icont prog2 prog1.u
-
signifies the use of standard input as a source file. In this case, the
ucode files are named stdin.u1
and stdin.u2
, and
the icode file is named stdin
.-s
option. Normally, both informative messages and error
messages are sent to standard error output.-t
option causes &trace
to have an initial
value of -1 when the icode file is executed. Normally, &trace
has an initial value of 0. The effect of -t
is to produce diagnostic
messages for procedure calls, returns, and resumptions and for co-expression
activation.-u
causes warning messages to be issued for undeclared
identifiers in the program.icont -c
.
The standard Icon program library contains many useful procedures and is
practically essential for constructing graphics programs of any complexity.IPATH
environment
variable. This space-separated list is searched to satisfy link declarations.runs the icode fileprog text.dat log.dat
prog
, passing its main procedure a list
of two strings, "text.dat"
and "log.dat"
.
The program also can be translated and run with these arguments with a single
command line by putting the arguments after the -x
:
These arguments might be the names of files. For example, the main procedure might begin as follows:icont prog -x text.dat log.dat
procedure main(args) in := open(args[1]) | stop("cannot open input file") out := open(args[2], "w") | stop("cannot open output file") . . .
STRSIZE
(500000)- This variable determines the size, in bytes, of the initial region in which strings are stored. If additional string regions are needed, they may be smaller.
BLKSIZE
(500000)- This variable determines the size, in bytes, of the initial region in which Icon allocates lists, tables, and other objects. If additional block regions are needed, they may be smaller.
COEXPSIZE
(2000)- This variable determines the size, in 32-bit words, of each co-expression block.
MSTKSIZE
(10000)- This variable determines the size, in words, of the main interpreter stack.
TRACE
(undefined)- This variable initializes the value of
&trace
. If this variable has a value, it overrides the translation-time-t
option.
NOERRBUF
(undefined)- If this variable is set,
&errout
is not buffered.
Icon Project
Department of Computer Science
The University of Arizona
P.O. Box 210077
Tucson, AZ 85721-0077
U.S.A.
(520) 621-6613 (voice)
(520) 621-4246 (fax)
icon-project@cs.arizona.edu
The Icon Programming
Language, Prentice-Hall, Inc., Englewood Cliffs, NJ, second edition,
1990.
Graphics
Facilities for the Icon Programming Language; Version 9.1, The Univ.
of Arizona Icon Project Document IPD268, 1995.
The Icon Program Library;
Version 9.2. The Univ. of Arizona Icon Project Document IPD272,
1995.
Variant Translators for Version 9 of
Icon, The Univ. of Arizona Icon Project Document IPD245,
1994.
Calling C Functions
from Version 9 of Icon, The Univ. of Arizona Icon Project Document IPD240,
1995.