News flash: I'm going to Australia in February, so this Web site may be switched off at any time.
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@nmt.edu