record (reserved word)

Language:
Русский
English

 record (reserved word)


A record contains a number of components, or fields, that can be of different types.

Syntax

 record
   fields;
   fields;
   ...
   fields
 end;

  OR

 record
   fields;
   ...
   case tag: type of
   case: ( fields );
   ...
   case: ( fields )
 end;

Remarks

Each field list is a comma-separated list of identifiers, followed by a colon and a type.

Example

 { Record Type Definitions }
 type
   Class  = (Num, Dat, Str);
   Date   = record
      D, M, Y: Integer;
   end;
   Facts = record
     Name: string[10];
     case Kind: Class of
       Num: (N: real);
       Dat: (D: Date);
       Str: (S: string);
   end;

See Also

Тэги: record
| G+
Код для вставки: :: :: :: ::
Поделиться: // //