ICON(1)

πŸ“¦
version 9.5.25a Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸŽ€ 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 the icont command does when you run it with the -s and -u options. periodt.

🌈 make your source file go zoom (directly executable)

You can make an Icon source file directly executable by:

  1. setting the appropriate permission bits πŸ”
  2. 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 πŸŽ€


🫢 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