What is the difference between a figurative constant and a user-defined constant in COBOL?

  • Figurative constants are declared using the CONSTANT keyword, while user-defined constants use the VALUE clause
  • Figurative constants are numeric, and user-defined constants are alphanumeric
  • Figurative constants represent predefined values like ZERO and SPACE, while user-defined constants are explicitly defined by the programmer using the VALUE clause
  • There is no difference between figurative and user-defined constants in COBOL
Figurative constants in COBOL represent predefined values like ZERO, SPACE, etc. User-defined constants are explicitly defined by the programmer using the VALUE clause in the DATA DIVISION.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *