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

Testing an Icon table for the presence of a key

Tech Computer Center logo

If you try to retrieve an item from a table using a particular key value, and nothing has ever been stored under that value, the result depends on how you created the table (see `Creating an Icon table').

For example, if you have created the ``dayNumbers'' array (see `Storing items in an Icon table'), this code would stop the program if there is no entry for the day with name ``today'':

    if  / dayNumbers[today]  then
      stop ( "Argh! There's no such day as ",
             today, "!" );

Next: Creating your own record types in Icon
See also: Using the table type in Icon
Previous: Retrieving items from 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,
Last updated: 1998/02/08 23:17:55 UT
QR two-dimensional bar code