Elemental Intrinsic Function (Generic): Reverses the value of a specified bit in an integer.
Syntax
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, see Bit Functions.
Compatibility
CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB
See Also: BTEST, IAND, IBCLR, IBSET, IEOR, IOR, ISHA, ISHC, ISHL, ISHFT, NOT
Example
INTEGER J, K
J = IBCHNG(10, 2) ! returns 14 = 1110
K = IBCHNG(10, 1) ! returns 8 = 1000