Select values from two arrays according to a logical mask. The result is equal to tsource if mask is .true., or equal to fsource if it is .false..
Fortran 95 and later
result = merge(tsource, fsource, mask)
tsource - May be of any type.fsource - Shall be of the same type and type parameters as tsource.mask - Shall be of type logical.The result is of the same type and type parameters as tsource.