Next: , Previous: , Up: Intrinsic Procedures   [Contents][Index]


9.194 MERGE_BITS — Merge of bits under mask

Description:

MERGE_BITS(I, J, MASK) merges the bits of I and J as determined by the mask. The i-th bit of the result is equal to the i-th bit of I if the i-th bit of MASK is 1; it is equal to the i-th bit of J otherwise.

Standard:

Fortran 2008 and later

Class:

Elemental function

Syntax:

RESULT = MERGE_BITS(I, J, MASK)

Arguments:
IShall be of type INTEGER.
JShall be of type INTEGER and of the same kind as I.
MASKShall be of type INTEGER and of the same kind as I.
Return value:

The result is of the same type and kind as I.