up previous next
create a record
record[F_1 := OBJECT,..., F_n := OBJECT]
where each F_i is a field name
This constructor creates a record with fields called
The empty record is given by
Records in CoCoA are open
in the sense that new fields may be
added after the record is first defined. The names allowed for the
fields are the same as those allowed for variables.
The dot operator is used to access the fields in a record.
/**/ P := record[height := 10, width := 5];
/**/ P.height * P.width;
/**/ P.area := It; --> creates a new field called "area"
record[area := 50, height := 10, width := 5]