Next
/
Previous
/ Index
/ TCC Help System
/ Publications
/ Site map
/ NM Tech homepage
Icon says hello
|
|
Here is the customary ``hello, world'' program in Icon. Using
your favorite
text editor, create
a file named hello.icn and type these three lines in
it:
procedure main ()
write ( "Yarrr, matey, bilge the yardarm!" );
end
- Every Icon procedure starts with the word
``procedure'' and ends with the word ``end''.
- Every Icon program must contain a procedure with the name
``main'', and that procedure is where execution starts.
- This program has only one line, a call to the built-in
``write'' procedure, which writes its arguments to
the standard output stream.
- There is only one argument to the ``write'' procedure,
a string constant enclosed in double-quote (")
characters.
Next: Compiling and running an Icon program
See also: A tutorial for the Icon programming language
Site map
Index:
Keyword index
to help pages
Help:
New Mexico Tech Computer Center: Help System
TCC Publications
To report a problem: File a ticket
Send mail to the User consultant
on duty or call them at 575-835-5437
Home:
About New Mexico Tech
John Shipman, john@nmt.edu
Last updated: 1996/01/06 21:12:57 UT
URL: http://www.nmt.edu/tcc/help/lang/icon/hello.html
|
|