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:
- A name declared with the BUILTIN attribute cannot have any other attribute.
- A name declared with the FILE or ENTRY attribute, but without the VARIABLE attribute, is a named constant, not a variable,
and its scope is external. (Recall, however, that the presence of a storage class, an array bound, or a member's level-number
causes the VARIABLE attribute to be supplied by default to declarations containing the ENTRY and FILE attributes.)