1ICON(1) General Commands Manual ICON(1)
2
3
4
6 icon - execute Icon program
7
9 icon sourcefile [ arg ... ]
10 icon -P 'program' [ arg ... ]
11
13 Icon is a simple interface for executing programs written in the Icon
14 programming language. The source code is translated and linked, then
15 executed with the given list of arguments.
16
17 Without -P, a single source file is read; its name must be given ex‐
18 actly and need not end in .icn. A sourcefile name of - reads the
19 source code from standard input.
20
21 With -P, a small program can be embedded within a larger shell script.
22 In this case the program argument is a complete Icon program, typically
23 given as a multi-line quoted string.
24
25 Translation and linking is silent, suppressing progress messages, and
26 undeclared identifiers are diagnosed. This mirrors the behavior of the
27 icont command when run with -s and -u options.
28
29 An Icon source file can be made directly executable by setting the ap‐
30 propriate permission bits and beginning it with a shell header. If the
31 first line of the file is
32 #!/usr/bin/env icon
33 then icon is found on the command search path and called to process the
34 program upon execution.
35
37 The environment variables described under icont(1) can also be used
38 with the icon command. Normally, none of these are needed. The direc‐
39 tory containing sourcefile is searched first for any $include files.
40
42 icont(1), the full-featured interface supporting separate compilation,
43 multiple source files, and other features.
44
45 The Icon Programming Language.
46 Griswold and Griswold, Peer-to-Peer, third edition, 1996.
47 http://www.cs.arizona.edu/icon/lb3.htm.
48
49 Graphics Programming in Icon.
50 Griswold, Jeffery, and Townsend, Peer-to-Peer, 1998.
51 http://www.cs.arizona.edu/icon/gb/index.htm.
52
53 The Icon Programming Language.
54 http://www.cs.arizona.edu/icon/.
55
56
57
58University of Arizona 4 June 2013 ICON(1)