Description: |
Reverses the value of a specified bit in an integer. | ||

Class: |
Elemental function; Generic | ||

Arguments: |
I | Must be of type integer. This argument contains the bit to be reversed. | |

POS | Must be of type integer. This argument is the position
of the bit to be changed.
The rightmost (least significant) bit of I is in position 0. | ||

Results: |
The result type is the same as
I. The result is equal to I with the bit in position POS
reversed.
For more information on bit functions, see Section 9.2.3. |

**Examples**

Consider the following:

INTEGER J, K J = IBCHNG(10, 2) ! returns 14 = 1110 K = IBCHNG(10, 1) ! returns 8 = 1000

Previous Page Next Page Table of Contents