Unicon Language resources
This page contains some resources for the Unicon programming language,
which is an object-oriented extension of the popular Icon language,
at the University of Arizona.
About Icon and Unicon
Icon is a programming language developed over many years by a team at
University of Arizona.
A brief introduction to Icon can be found at http://www.cs.arizona.edu/icon/intro.htm
Unicon adds objects to Icon, which is a procedural language.
features are documented by its creator, Dr Clint Jeffery, of the New
State University. See the Unicon pages at Sourceforge http://unicon.sourceforge.net
Unicon Library Classes
I am developing as an ongoing project a set of Unicon library classes.
The source code is split into several Unicon packages, as follows :-
gui - a complete set of gui classes for designing a modern UI. Features
An object hierarchy providing all the standard components required to
a modern application, including trees, tables, editable text areas, and
A fully featured menu system.
Easy subclassing of components to create custom components.
A ticker (timer) feature whereby arbitrary objects may have a tick
invoked at specified intervals. These methods are then scheduled
Support for modal and modeless dialogs.
Extensive built-in use of double buffering to eliminate unsightly
from updating displays.
Free application of Icon graphic attributes to components.
ivib - not really a library, this is a program for designing GUIs using
the above classes visually, using a drag-and-drop interface. Designs
output as Unicon source code, and can be re-input for further editing.
Click here for an example screen shot of Ivib.
lib - Some general library classes for the following :-
langprocs.icn - some fundamental class utilities, including functions
displaying, serializing and cloning objects.
format.icn - Formatting of numeric data.
gethttp.icn - Gets data from a server using the HTTP protocol,
handling retries and timeouts. Currently not working due to bugs in the
Icon runtime system.
money.icn - Represents monetary values.
process.icn - A convenient class wrapper for using multiple processes
Unicon's fork. See also ipc below for inter-process communication.
qsort.icn - An implementation of quicksort.
stringbuff.icn - A class to overcome Icon's inefficiency at building up
very long strings by concatenation.
time.icn - A date/time class.
url.icn - A class for representing URLs, with facilities for
with CGI paramters.
parser - Some classes for parsing Unicon source code, using the same
and grammar used by the compiler.
unidep - A program for creating makefile entries for a set of Unicon
files. This is a great help when creating a project from multiple
files. It ensures that each file is compiled before any of the classes
it contains are referenced by any other file.
unidoc - A program to produce documentation from unicon source files,
in html or groff format. Current HTML output for the whole
is available online. Steve Wampler
done a similar program (also called Unidoc!), which is more flexible in
that it can handle Icon source as well as Unicon. See the link below to
Steve Wampler's page for more details.
xml - A validating XML parser and an HTML
ipc - An easy-to-use interface to the Unix IPC facilities, namely
message queues and shared memory. Full documenation is
Library API documentation
Full auto-generated API documentation for the library can be found here.
A PDF document covering the gui package can be downloaded here (about 580kB).
The source code is now part of the unicon sourceforge CVS repository :-
This is a page about how to use packages
Unicon major mode for Emacs
This is based on the Icon major mode. To use it, download the file unicon.el
, and place it in a convenient directory; in my case /home/rpp/bin.
add the following to your .emacs file :-
;; Add the directory with unicon.el in it to emacs' search path.
Some other options are available. After loading, type C-h,a,unicon to
a list of available variables.
;; Change the directory as appropriate.
(setq load-path (append load-path '("/home/rpp/bin")))
(autoload 'unicon-mode "unicon")
;; Define the mode for .icn files
(setq auto-mode-alist (cons '("\\.icn\\'" . unicon-mode) auto-mode-alist))
;; User setup - may be customized.
(setq unicon-indent-level 3)
(setq unicon-continued-statement-offset unicon-indent-level)
(setq unicon-class-indent-level unicon-indent-level)
(setq unicon-brace-offset (- unicon-indent-level))
; Spaces rather than spaces+tabs
(setq unicon-indent-use-only-spaces t)
Because this file is based on the Icon major mode, it is subject to
the GNU general public license: see the file COPYING
My email address is r dot parlett at zen dot co dot uk.
modified: Sat Mar 1 14:37:21 GMT 2003