Welcome Resume References Education Course Work Contact

Programming Languages

What is Icon?

Icon Homepage
  • Icon is a Very High-Level procedural Programming Language.
  • A descendant of the SNOBOL family of languages, but syntax closely relates to the C programming langauge.
  • The language is written in C and is compiled down to C before it is complied into machine code.
  • The name Icon has no relation to the GUI term for a clickable image
  • Some of its applications include:
    • Prototyping
    • Tools
    • Text Processing
    • Graphics Programming
    • Artificial Intelligence
  • For more general information visit Icon's homepage at www.cs.arizona.edu/icon/

Code Examples:

One thing that seperates ICON from other languages is the use of generators. I have written a simple program that outlines the uses of the different generators.

ICON also supports powerful text processing functions reminiscent of the SNOBAL family of languages from which it is derived. Here is a simple program to change the background colors of several HTML files using fast simple coding techniques. Line #10, which is commented out, can be used on a Unix based system to get the file list of a folder and place it in an array.

2D Graphics is also made easy with the use of built in functions. I have made a quick program similar to Microsoft's Paint application that comes with Windows. This program isn't complete as it only took me one evening to code. Just another example of how ICON can be used for fast prototyping.

Foxes and Rabbits Image

My Final Example combines all of the above concepts along with artificial intelligence to create the game Foxes and Rabbits. The object of the game is to get all the foxes and rabbits onto the other side of the river. The rules are that only two animals can go on the raft at a time, and if there is a greater number of foxes than rabbits on either side at any time, the Foxes will eat the rabbits and the game will end. However, if there are zero rabbits on a given side, there can be any number of foxes on that side. Get it? Here's the code and windows program.

I have also written some A.I. code to solve the algorithm for you and animate the program. this is an external program to the Foxes&Rabbits application that prints and returns the solution.


back

top of page

next
Welcome :: Resume :: References :: Education :: Course Work :: Contact
chuyler1@ic3.ithaca.edu Last Revision: