Record-type constants


   Record-type constants

The declaration of a record-type constant specifies the identifier and value of each field.

The fields must be specified in the same order as they appear in the definition of the record type.

  - If a record contains fields of file types, the constants of that record
   type cannot be declared.
  - If a record contains a variant, only fields of the selected variant can
   be specified.
  - If the variant contains a tag field, its value must be specified.


   Point = record
     X, Y: Real;
   Vector = array[0..1] of Point;
   Month = (Jan, Feb, Mar, Apr, May, Jun, Jly, Aug, Sep, Oct, Nov, Dec);
   Date = record
     D: 1..31;
     M: Month;
     Y: 1900..1999;
   Origin: Point = (X: 0.0; Y: 0.0);
   Line: Vector = ((X: -3.1; Y: 1.5), (X: 5.8; Y: 3.0));
   SomeDay: Date = (D: 2; M: Dec; Y: 1960);

Код для вставки: :: :: :: ::
Поделиться: // //