Previous Topic Next topic Print topic


Attribute Consistency

After default attributes have been supplied, each declaration is checked by the Compiler for consistency and completeness.

If no data type is specified, either explicitly or by the DEFAULT statement, the declaration is invalid and incomplete. The Compiler issues an error message and supplies a type of Fixed Binary(15) for names beginning with any of the letters I through N, and Float Decimal(6) for names beginning with any other alphabetic character.

A declaration is inconsistent and invalid if it specifies more than one data type or more than one storage class.

These are the valid data types:
  • Fixed Binary(p)
  • Fixed Decimal(p[,q])
  • Float Binary(p)
  • Float Decimal(p)
  • Picture
  • Character(n) [Varying]
  • Bit(n)[Aligned]
  • Pointer
  • Offset
  • Area
  • Label
  • Entry [returns][variable]
  • File [variable]
  • Builtin
  • Structure
These are the valid storage classes:
  • automatic
  • based or based(pointer-reference)
  • static internal
  • defined(reference)
  • parameter
  • member of structure

A declaration is also inconsistent and invalid if it violates the following attribute-specific restrictions:

Previous Topic Next topic Print topic