Creating an Icon table
The Icon function ``
table()'' creates a new table.
table()'' with no arguments creates an empty table.
table(x)'' creates a table in which all entries are assumed to have value x until otherwise defined.
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.
John Shipman, firstname.lastname@example.org
Last updated: 1996/01/06 21:12:57 UT