Structures are compound types. Both input and output structures are treated in this section. Follows the description of all the structures:
Structure | Description | Examples |
---|---|---|
|
Record structure This is a fixed length multi-type structure |
record a:nat b:real end
{23 .345} |
list of type |
List structure This is a variable length single-type structure |
list of nat
{2 3 4 6 7 8 3 4 2 3} |
array(nat) of type |
Array structure This is a fixed length single-type structure |
array(5) of nat
{1 2 3 4 5} |
|
Case structure In dependence of the first id, it can have different types Else line is optional |
case a of 1 b:nat c:real end
{1 23} |
Although input and output structures are syntactically identical, semantically they are not. Moreover, input types cannot be used inside output structures and vice versa.
Back to main page. | Send comments to: Igor Sfiligoi |