ILE COBOL Language Reference


Arithmetic Expressions

Expressions calculate values which can then be used as operands in conditional and arithmetic statements. Arithmetic expressions are built up from operands and operators under a strict hierarchy and precedence.

In general, any arithmetic expression can be:

  1. An elementary numeric item such as:
  2. An arithmetic expression surrounded by parentheses
  3. An arithmetic expression preceded by a unary operator (+, -)
  4. Two arithmetic expressions separated by a binary arithmetic operator (+, -, *, /, **)

Identifiers and literals appearing in arithmetic expressions must represent either numeric elementary items or numeric literals on which arithmetic may be performed.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]