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


9.195 MERGE — Merge variables

Description:

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..

Standard:

Fortran 95 and later

Class:

Elemental function

Syntax:

RESULT = MERGE(TSOURCE, FSOURCE, MASK)

Arguments:
TSOURCEMay be of any type.
FSOURCEShall be of the same type and type parameters as TSOURCE.
MASKShall be of type LOGICAL.
Return value:

The result is of the same type and type parameters as TSOURCE.