RESHAPE man page on IRIX

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

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

NAME
     RESHAPE - Constructs an array of a specified shape

SYNOPSIS
     RESHAPE ([SOURCE=]source, [SHAPE=]shape [,[PAD=]pad] [,[ORDER=]order])

IMPLEMENTATION
     UNICOS, UNICOS/mk, and IRIX systems

STANDARDS
     Fortran 90

DESCRIPTION
     The RESHAPE intrinsic function constructs an array of a specified
     shape from the elements of a given array.	It accepts the following
     arguments:

     source    May be of any type.  It must be array valued.  If pad is
	       absent or of size zero, the size of source must be greater
	       than or equal to PRODUCT(shape).	 The size of the result is
	       the product of the values of the elements of shape.

     shape     Must be an integer, of rank one, and of constant size.  Its
	       size must be positive and less than 8.  It must not have an
	       element whose value is negative.

     pad       Must be of the same type as source.  It must be array
	       valued.

     order     Must be of type integer.	 It must have the same shape as
	       shape, and its value must be a permutation of (1,2,...,n),
	       where n is the size of shape.  If absent, the default order
	       is (1,2,...,n).

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

RETURN VALUES
     The type of the result is the same type as source.	 The result is an
     array of shape shape, that is, SHAPE(RESHAPE(source,shape,pad,order))
     is equal to shape.

     The elements of the result, taken in permuted subscript order
     order(1), ..., order(n), are those of source in normal array element
     order followed, if necessary, by those of pad in array element order,
     followed, if necessary, by additional copies of pad in array element
     order.

EXAMPLES
     Example 1:	 RESHAPE((/1,2,3,4,5,6/), (/2,3/)) has the following value:

	| 1 3 5 |

	| 2 4 6 |

     Example 2:	 RESHAPE((/1,2,3,4,5,6,7,8,9/), (/3,4/), (/0,0/)) has the
     following value:

	| 1 4 7 0 |

	| 2 5 8 0 |

	| 3 6 9 0 |

     Example 3:	 RESHAPE((/1,2,3,4,5,6/), (/2,4/), (/0,0/), (/2,1/)) has
     the following value:

	| 1 2 3 4 |

	| 5 6 0 0 |

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