IOR(I, J)

Purpose

Performs an inclusive OR.

Class

Elemental function

Argument Type and Attributes

I
must be of type integer.

J
must be of type integer with the same kind type parameter as I.

Result Type and Attributes

Same as I.

Result Value

The result has the value obtained by combining I and J bit-by-bit according to the following truth table:

I   J   IOR (I,J)
-----------------
1   1      1
1   0      1
0   1      1
0   0      0

The bits are numbered 0 to BIT_SIZE(I)-1, from right to left.

Examples

IOR (1, 3) has the value 3. See Integer Bit Model.


Specific Name Argument Type Result Type Pass As Arg?
IOR (1) any integer same as argument yes
OR (1) any integer same as argument yes

Notes:

  1. IBM Extension.
IBM Copyright 2003