PLDB
Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon

Icon

Icon

Icon is a pl created in 1977 by Ralph Griswold.

#201on PLDB 45Years Old 271Users
3Books 19Papers

Try now: Riju · TIO

Icon is a very high-level programming language featuring goal-directed execution and many facilities for managing strings and textual patterns. It is related to SNOBOL and SL5, string processing languages. Icon is not object-oriented, but an object-oriented extension called Idol was developed in 1996 which eventually became Unicon.. Read more on Wikipedia...


Example from Riju:
procedure main () write("Hello, world!") end
Example from hello-world:
procedure main() write("Hello World"); end
Example from the Hello World Collection:
# Hello world in Icon (http://www.cs.arizona.edu/icon/) procedure main() write("Hello world") end
Example from Wikipedia:
procedure main() s := "Mon Dec 8" s ? write(Mdate() | "not a valid date") end # Define a matching function that returns # a string that matches a day month dayofmonth procedure Mdate() # Define some initial values static dates static days initial { days := ["Mon","Tue","Wed","Thr","Fri","Sat","Sun"] dates := ["Jan","Feb","Mar","Apr","May","Jun", "Jul","Aug","Sep","Oct","Nov","Dec"] } every suspend (retval <- tab(match(!days)) || # Match a day =" " || # Followed by a blank tab(match(!dates)) || # Followed by the month =" " || # Followed by a blank matchdigits(2) # Followed by at least 2 digits ) & (=" " | pos(0) ) & # Either a blank or the end of the string retval # And finally return the string end # Matching function that returns a string of n digits procedure matchdigits(n) suspend (v := tab(many(&digits)) & *v <= n) & v end

Language features

Feature Supported Example Token
Integers
# \b([+-]?[0-9]+[KMGTPkmgtp]?)\b
Floats
# [+-]?[0-9]*\.([0-9]*)([Ee][+-]?[0-9]*)?
Hexadecimals
# \b([+-]?([2-9]|[12][0-9]|3[0-6])[rR][0-9a-zA-Z]+)\b
Strings
"Hello world"
"
Print() Debugging write
Comments
# A comment
Line Comments
# A comment
#
Semantic Indentation ϴ

Books about Icon from ISBNdb

title authors year publisher
The Icon Book: Visual Symbols for Computer Systems and Documentation Horton, William 1994 Wiley
Graphics Programming In Icon Ralph E. Griswold and Gregg M. Townsend and Clinton L. Jeffery 1998 Peer To Peer Communications
The Icon Programming Language (prentice-hall Software Series) Ralph E Griswold 1983 Prentice-hall

Publications about Icon from Semantic Scholar

title authors year citations influentialCitations
Generators in Icon R. Griswold and D. R. Hanson and John T. Korb 1981 52 2
A portable storage management system for the icon programming language D. R. Hanson 1980 27 3
The icon programming language: an overview R. Griswold and D. R. Hanson and John T. Korb 1979 21 1
Measuring the Performance and Behavior of Icon Programs Cary A. Coutant and R. Griswold and D. R. Hanson 1983 20 0
The Evaluation of Expressions in Icon R. Griswold 1982 15 1
A framework for execution monitoring in icon C. Jeffery and R. Griswold 1994 13 2
The implementation of generators and goal‐directed evaluation in icon S. Wampler and R. Griswold 1983 11 0
String Scanning in the Icon Programming Language R. Griswold 1990 11 0
An optimizing compiler for the icon programming language Kenneth Walker and R. Griswold 1992 11 1
History of the Icon programming language R. Griswold and Madge T. Griswold 1993 10 0
A recursive interpreter for the Icon programming language Janalee O'Bagy and R. Griswold 1987 10 0
The design and implementation of dynamic hashing for sets and tables in icon W. Griswold and Gregg M. Townsend 1993 9 1
A new implementation of the Icon language T. Proebsting and Gregg M. Townsend 2000 9 1
Co-Expressions in Icon S. Wampler and R. Griswold 1983 6 0
Logicon: An integration of prolog into icon G. Lapalme and S. Chapleau 1986 6 1
Expression evaluation in the icon programming language R. Griswold 1984 5 0
Modeling software tools with ICON O. Fonorow 1988 4 0
The Icon programming language a new approach to high-level string processing R. Griswold 1979 2 0
Garbage collection alternatives for icon M. Fernández and D. R. Hanson 1992 1 1
grep.html · icon.html · makefile.html

View source

PLDB - Build the next great programming language · v2022 · Day 31 · Docs · Build · Acknowledgements · Traffic Today · Traffic Trends · Mirrors · GitHub · feedback@pldb.com