PACK

8.189 PACK — Pack an array into an array of rank one

Description:
Stores the elements of ARRAY in an array of rank one.

The beginning of the resulting array is made up of elements whose MASK equals TRUE. Afterwards, positions are filled with elements taken from VECTOR.

Standard:
Fortran 95 and later
Class:
Transformational function
Syntax:
RESULT = PACK(ARRAY, MASK[,VECTOR])
Arguments:
ARRAY Shall be an array of any type.
MASK Shall be an array of type LOGICAL and of the same size as ARRAY. Alternatively, it may be a LOGICAL