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

Retrieving items from an Icon table

Tech Computer Center logo

Once you have stored a value v into a table t using key k, you can retrieve the stored value using this expression:

    t[k]
For example, if the variable ``today'' contains the three-letter string for the day of the week, and you have a table ``dayNumbers'' set up as shown in the previous page (see `Storing items in an Icon table'), the expression
    dayNumbers[today]
will return the value stored under that key. If ``today'' is the string "Tue", the expression ``dayNumbers[today]'' will produce the integer 3.
Next: Testing an Icon table for the presence of a key
See also: Using the table type in Icon
Previous: Storing items in an Icon table
Site map
Index: Keyword index to help pages
Help: New Mexico Tech Information Technology and Communications: Help System
ITC Publications
To report a problem: File a ticket
Send mail to the User consultant on duty or call them at 575-835-5437
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/retrievetable.html
QR two-dimensional bar code