summaryrefslogtreecommitdiff
path: root/man/man1/icon.1
blob: 785db3a697d7d9ab99ed50f8657269fbf1bd1d3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
.TH ICON 1 "9 August 2005" "University of Arizona"
.SH NAME
icon \- execute Icon program
.SH SYNOPSIS
\fBicon\fP sourcefile [ arg ... ]
.br
\fBicon \-P\fP 'program' [ arg ... ]
.SH DESCRIPTION
.I Icon
is a simple interface for executing programs written
in the Icon programming language.
The source code is translated and linked,
then executed with the given list of arguments.
.PP
Without
.BR \-P ,
a single source file is read;
its name must be given exactly
and need not end in
.BR .icn .
A sourcefile name of
.B \-
reads the source code from standard input.
.PP
With
.BR \-P ,
a small program can be embedded within a larger shell script.
In this case the
.I program
argument is a complete Icon program, typically given as a
multi-line quoted string.
.PP
Translation and linking is silent, suppressing progress messages,
and undeclared identifiers are diagnosed.
This mirrors the behavior of the 
.I icont
command when run with
.B \-s
and
.B \-u
options.
.PP
An Icon source file can be made directly executable
by setting the appropriate permission bits and
beginning it with a shell header.
If the first line of the file is
.in +.5i
.B #!/usr/bin/env icon
.in
then
.I icon
is found on the command search path
and called to process the program upon execution.
.SH ENVIRONMENT
The environment variables described under
.IR icont (1)
can also be used with the
.I icon
command.
Normally, none of these are needed.
.SH SEE ALSO
.BR icont (1),
the full-featured interface supporting separate compilation,
multiple source files, and other features.
.LP
\fIThe Icon Programming Language\fP.
.br
Griswold and Griswold, Peer-to-Peer, third edition, 1996.
.br
http://www.cs.arizona.edu/icon/lb3.htm.
.LP
\fIGraphics Programming in Icon\fP.
.br
Griswold, Jeffery, and Townsend, Peer-to-Peer, 1998.
.br
http://www.cs.arizona.edu/icon/gb/index.htm.
.LP
.LP
.IR "Version 9.5.0 of Icon" .
.br
http://www.cs.arizona.edu/icon/v950.