MERGE — Merge variables#
-
MERGE(TSOURCE, FSOURCE, MASK)#
Select values from two arrays according to a logical mask. The result is equal to
TSOURCE
ifMASK
is.TRUE.
, or equal toFSOURCE
if it is.FALSE.
.- Parameters
TSOURCE – May be of any type.
FSOURCE – Shall be of the same type and type parameters as
TSOURCE
.MASK – Shall be of type
LOGICAL
.
- Returns
The result is of the same type and type parameters as
TSOURCE
.
- Standard:
Fortran 90 and later
- Class:
Elemental function
- Syntax:
RESULT = MERGE(TSOURCE, FSOURCE, MASK)