Icon is a little-known language. I encountered it first on my Atari ST in the early 1990s, and used it quite often. I even received copies of the Icon Analyst, and wrote some machine-learning algorithms in the language for my MSc. Thirty years later, and it's still a favourite language of mine.
- A personal collection of libraries (pcl), see separate documentation
- Language tools (see icon-tools):
- Notes/examples (see icon-examples):
- Advent of Code - with descriptions of some Icon solutions
- Requirements
- pcl libraries
- Install
- download the latest release of icon-tools
-
compile the code in "icontags" with "icont" (tested using Icon 9.5.1), e.g.:
> icont icontags.icn
- place "icontags.icx" somewhere on your PATH
- Basic Use
To create tags for the "icontags.icn" file, call:
> icontags icontags.icn
A sorted list of tags appears in the file "tags".
For more options:
> icontags -h icontags: filename(s) Writes record and procedure definition positions to a 'tags' file. -h --help : displays help message -v --version : show version -o --output filename : output filename, defaults to 'tags' -r --read-files : read file list from stdin, e.g. piped from another source
Filenames can be listed on the command-line. However, on Windows, CMD does not expand wildcards into multiple files. Therefore, the flag "-r" makes icondoc read the filenames from stdin, enabling you to pipe the filenames to the program:
> dir /b *.icn | icontags -r
On Linux, I build the latest version from G.Townsend's source; when on Windows, I use Icon version 9.5.1 from the Arizona website.
For working with Vim, I use my own icon-pcl.vim package:
-
help files - see
:help icon-pcl
- language reference - from the Programming in Icon book
- ipl-libs - documentation for the Icon Program Library (selected)
- pcl-libs - documentation for my own libraries
- highlighting - the built-in highlighter works well
- indentation - the built-in indenter does not work well (in progress)
- tags - use #IconTags to create tags file for Icon code
Install the package by git cloning or unpacking to (for example):
- "~/vimfiles/pack/plugins/start/icon-pcl.vim"
After installing, create the help documentation tags in vim using:
:helptags ALL
and look at the documentation, starting with:
:help icon-pcl