Module 3: COBOL Program structure
COBOL FIGURATIVE CONSTANTS
- Figurative constants have some fixed names and the compiler has the ability to recognize these names and sets the corresponding values in the object program.
- Example:-
MOVE ZERO TO EMP-COUNT. - In above example, value ‘0’ will be moved to variable EMP-COUNT as compiler will recognizes ZERO and sets EMP-COUNT to ‘0’.
- Given below are list Figurative constants and their description:-
Figurative Constants Description ZERO
ZEROS
ZEROESDenotes value 0, or one or more 0, based on the context SPACE
SPACESDenotes one or more spaces or blanks HIGH-VALUE
HIGH-VALUESDenotes the highest value in the collating sequence LOW-VALUE
LOW-VALUESDenotes the lowest value in the collating sequence QUOTE
QUOTESDenotes one or more single character (‘‘). ALL literal Denotes one or more of the string characters comprising the literal.