Declaring an Icon record type
To create your own record type in Icon, you must first define the names of the fields that go into the record.
record name ( f1, f2, ..., fn )where name is the name of the record type you are creating, and f1, f2, and so on are the names of the fields within the record.
Here is an example of a record type declaration:
record complex ( r, i )This defines a new record type named ``
complex'' which is a container for two fields named ``
r'' and ``
i''. You might use this to represent complex numbers, where ``
r'' is the real part and ``
i'' is the imaginary part.
John Shipman, email@example.com
Last updated: 1996/01/06 21:12:57 UT