HELPLIB.HLB  —  FORTRAN  Intrinsic Procedures, RESHAPE
  RESHAPE (source, shape [,pad] [,order])

  Class:  Transformational function - Generic

  Constructs an array with a different shape from the argument
  "source" array.

  The size of the "source" array must be >= PRODUCT(shape) if "pad"
  is absent or has size zero.  The "shape" must be an integer array
  of up to 7 elements, with rank one and constant size.  Its size
  must be positive; its elements must not have negative values.  The
  "pad" must be an array of the same type and kind type parameters as
  "source".  It is used to fill in extra values if the result array
  is larger than "source".  The "order" must be an integer array with
  the same shape as "shape".

  The result is an array of shape "shape" with the same type and kind
  type parameters as "source".  The size of the result is the product
  of the values of the elements of "shape".

  In the result array, the array elements of "source" are placed in
  the order of dimensions specified by "order".  If "order" is
  omitted, the array elements are placed in normal array element
  order.

  The array elements of "source" are followed (if necessary) by the
  array elements of "pad" in array element order.  If necessary,
  additional copies of "pad" follow until all the elements of the
  result array have values.

  Examples:

  RESHAPE ((/3, 4, 5, 6, 7, 8/), (/2, 3/)) has the value

   |3 5 7|.
   |4 6 8|.

  RESHAPE ((/3, 4, 5, 6, 7, 8/), (/2, 4/), (/1, 1/), (/2, 1/)) has
  the value

   |3 4 5 6|.
   |7 8 1 1|
Close Help