MERGE_BITS(3f)

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

I Shall be of type INTEGER. J Shall be of type INTEGER and of the same kind as I. MASK Shall be of type INTEGER and of the same kind as I.

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

AUTHOR

This information was taken from the GFortran documentation (https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gfortran/) and converted to a manpage by AstroFloyd (http://astrofloyd.org).