Previous Topic Next topic Print topic


The BOOLEAN-OF-INTEGER Statement

The BOOLEAN-OF-INTEGER function returns a boolean item of usage bit representing the binary value of argument-1. Argument-2 specifies the length of the boolean data item that is returned.

The function type is boolean.

The returned value is a boolean item of usage bit that has the same bit configuration as the binary representation of the value of argument-1, where the rightmost boolean position is the low-order binary digit. The boolean value is zero-filled or truncated on the left, if necessary, in order to return a boolean item whose length is specified by argument-2 in terms of boolean positions.

General Format

FUNCTION BOOLEAN-OF-INTEGER (argument-1 argument-2)

Syntax Rules

  1. Argument-1 must be a positive integer.
  2. Argument-2 must be a positive nonzero integer.
  3. Argument-2 must be a numeric constant when the function is used
    • in an expression with B-NOT
    • as part of a boolean expression which is used as an argument in INTEGER-OF-BOOLEAN
Previous Topic Next topic Print topic