FALSE

Page Nav

HIDE

Grid

GRID_STYLE

Figurative Constants in Cobol

Figurative Constants: Unlike most other programming languages COBOL does not provide a mechanism fo...


Figurative Constants:

Unlike most other programming languages COBOL does not provide a mechanism for creating user-defined constants but it does provide a set of special constants called Figurative Constants.
A Figurative Constant may be used wherever it is legal to use a literal but unlike literals, when a Figurative Constant is assigned to a data-item it fills the whole item overwriting everything in it.

The Figurative Constants are:

·         SPACE or SPACES                      Acts like one or more spaces
·         ZERO or ZEROS or ZEROES       Acts like one or more zeros
·         QUOTE or QUOTES                   Used instead of a quotation mark
·         HIGH-VALUE or HIGH-VALUES Uses the maximum value possible
·         LOW-VALUE or LOW-VALUES  Uses the minimum value possible
·         ALL                                             literal Allows a ordinary literal to act as Figurative Constant



No comments