unpack man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]

UNPACK(3I)					       Last changed: 1-6-98

NAME
     UNPACK - Unpacks an array of rank one into an array under control of a
     mask

SYNOPSIS
     UNPACK ([VECTOR=]vector, [MASK=]mask, [FIELD=]field)

IMPLEMENTATION
     UNICOS, UNICOS/mk, and IRIX systems

STANDARDS
     Fortran 90

DESCRIPTION
     The UNPACK intrinsic function unpacks an array of rank one into an
     array under control of mask.  It accepts the following arguments:

     vector    Can be of any type.  It must have rank one.  Its size must
	       be at least t where t is the number of true elements in
	       mask.

     mask      Must be of type logical and array valued.

     field     Must be of the same type as vector, and must be conformable
	       with mask.

     UNPACK is a transformational function.  The name of this intrinsic
     cannot be passed as an argument.

RETURN VALUES
     The result is an array of the same type as vector and the same shape
     as mask.

     The element of the result that corresponds to the ith true element of
     mask, in array element order, has the value vector(i) for i=1, 2, ...,
     t where t is the number of true values in mask.  Each other element
     has the value equal to field if field is scalar or to the
     corresponding element of field if it is an array.

EXAMPLES
     This example uses UNPACK to scatter specific values to specific
     positions in an array.

     Assume that M is the following array:

	| 1 0 0 |

	| 0 1 0 |

	| 0 0 1 |

     Assume that V is the array [1, 2, 3].

     Assume that Q is the logical mask:

	| F T F |

	| T F F |

	| F F T |

     In logical mask Q, T represents true and F represents false, so
     UNPACK(V, MASK=Q, FIELD=M) has the following value:

	| 1 2 0 |

	| 1 1 0 |

	| 0 0 3 |

     The result of UNPACK(V, MASK=Q, FIELD=0) has the following value:

	| 0 2 0 |

	| 1 0 0 |

	| 0 0 3 |

SEE ALSO
     Intrinsic Procedures Reference Manual, publication SR-2138, for the
     printed version of this man page.

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net