Next / Previous / Index / TCC Help System / Publications / Site map / NM Tech homepage

Creating an Icon table

Tech Computer Center logo

The Icon function ``table()'' creates a new table.

With the first form shown above, a reference to an element that has never been defined causes an error. If a table created with the second form, and then you refer to an element that has never been defined, you will get value x.

For example, this code

    phoneTable  :=  table();
creates an empty table, while this code
    totalsTable  :=  table ( 0 );
makes ``totalsTable'' a table in which every element is assumed to be 0 until it is changed to some other value.
Next: Storing items in an Icon table
See also: Using the table type in Icon
Site map
Index: Keyword index to help pages
Help: New Mexico Tech Computer Center: Help System
TCC Publications
Home: About New Mexico Tech

John Shipman, john@nmt.edu

Last updated: 1996/01/06 21:12:57 UT
URL: http://www.nmt.edu/tcc/help/lang/icon/createtable.html