Previous Topic Next topic Print topic


Restricted Expressions

When PL/I requires a (possibly signed) integer constant, a restricted expression can be used. A restricted expression is an expression whose value is calculated at compile time and used as a constant. For example, you can use expressions to define constants required for:
  • Character string lengths in STATIC declarations
  • Character string lengths for other storage classes (non-structure members)
  • Extents in static declarations
  • Values used in static initialization

A restricted expression is identical to a normal expression, but requires that each operand be either:

If using a built-in function, it must be from one of the following categories:

Restricted expression evaluation is done on RETURNS descriptors in entry declarations.

Previous Topic Next topic Print topic