Next: , Previous: %sort, Up: Top


13 %size

This special field is used to define constraints in the number of records stored in a record set. Its usage is:

     %size: [relational_operator] number

If no operator is specified then number is interpreted as the exact number of records of this type. The number can be any integer literal, including hexadecimal and octal constants. For example:

     %rec: Day
     %size: 7
     %type: Name enum
     + Monday Tuesday Wednesday Thursday Friday
     + Saturday Sunday
     %doc: There should be 7 days.

The optional relational_operator shall be one of <, <=, > and >=. For example:

     %rec: Item
     %key: Id
     %size: <= 100
     %doc: We have at much 100 different articles.

It is valid to specify a size of 0, meaning that no records of this type shall exist in the file.

This field shall appear only once in a record descriptor.