CoCoA:Record

From ApCoCoAWiki
Revision as of 10:02, 24 October 2007 by XMLBot (talk | contribs) (pushing XML rev. 1.46, again)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Record

create a record

Description

This function returns a record with fields X_1,...,X_n. The

empty record is given by Record[]. The records are open in the

sense that new fields may be added after the record is first defined.

Example

  P := Record[ Height = 10, Width = 5];
  P.Height * P.Width;
50
-------------------------------
  P.Area := It;
  P;
Record[Area = 50, Height = 10, Width = 5]
-------------------------------

Syntax

Record[X_1 = OBJECT,...,X_n = OBJECT]

where each X_i is a variable.

Fields

   <type>record</type>