ICON(1)
π NAME π
icon β execute Icon program β¨
π SYNOPSIS π
icon sourcefile [ arg ... ]
icon -P 'program' [ arg ... ]
π¦ DESCRIPTION π¦
okay so bestie, icon is literally the simplest lil doorway into running programs written in the Icon programming language. π Here's the tea: your source code gets translated and then linked, and then it actually runs β with whatever list of arguments you handed it. That's the whole vibe. π«Ά
πΈ no -P, just vibes (and a file)
Without -P, it reads a single source file. and I mean single, okay? one. π The name has to be given exactly β like, character for character β and no cap, it does not need to end in .icn. She's flexible like that. π
But here's the iconic part: if your sourcefile name is just -, then it reads the source code from standard input. feeding it through the pipe, main character energy. πβ¨
π with -P, embed that lil program
With -P, you can tuck a small program right inside a bigger shell script. π The program argument is a complete Icon program β usually you'd hand it over as a multi-line quoted string. it's giving nesting-doll realness. π
π silent but deadly (in a good way)
Translation and linking? silent. progress messages? suppressed, we don't need them, we're busy. π And undeclared identifiers do get diagnosed β so she'll tell you when something's undeclared. π
fr fr, this mirrors exactly what theicontcommand does when you run it with the-sand-uoptions. periodt.
π make your source file go zoom (directly executable)
You can make an Icon source file directly executable by:
- setting the appropriate permission bits π
- beginning it with a shell header π
And if the first line of the file is this exact line:
#!/usr/bin/env icon
then icon gets found on the command search path and gets called to process the program the moment you execute it. she found herself. she's on PATH. slay. β¨π
β ENVIRONMENT β
The environment variables described over in icont(1) can also be used with the icon command. π Normally though? none of these are needed. lowkey you can just forget they exist.
One thing though β the directory containing sourcefile is searched first for any $include files. π«Ά so keep your includes cozy and nearby, iykyk.
π SEE ALSO π
icont(1)β the full-featured interface, supporting separate compilation, multiple source files, and other features. the deluxe version. π- The Icon Programming Language. β Griswold and Griswold, Peer-to-Peer, third edition, 1996. π₯ http://www.cs.arizona.edu/icon/lb3.htm.
- Graphics Programming in Icon. β Griswold, Jeffery, and Townsend, Peer-to-Peer, 1998. π http://www.cs.arizona.edu/icon/gb/index.htm.
- The Icon Programming Language. β http://www.cs.arizona.edu/icon/. β
π«Ά and that's the whole page bestie!! this manual page is brought to you by the fine folks at University of Arizona, dated 4 June 2013. go write something iconic in Icon. literally. πβ¨ππ¦
π¦ where this page comes from
- debian trixie: iconx 9.5.24b-1
- ubuntu questing: iconx 9.5.25a-1
- ubuntu resolute: iconx 9.5.25a-2
- ubuntu stonking: iconx 9.5.25a-4 Β· LicenseRef-public-domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms