PRODUCT intrinsic function
Standard: F77 F90 F95 F2003
  Example Program
<Syntax>
PRODUCT ( ARRAY, DIM [ , MASK ] )
PRODUCT ( ARRAY [ , MASK ] )

ARRAY : rank N array of type Integer, Real or Complex;
DIM : scalar Integer in the range 1 to N;
MASK : array of type Logical with the same shape as ARRAY;

Result: Same type and kind as ARRAY.
<Semantics>
The result is ARRAY reduced by multiplication ( * ). If DIM is absent, this is a scalar equal to the product of all the masked elements of ARRAY. If DIM is present, the result has rank N-1 and the shape of ARRAY with dimension DIM removed; each element of the result is the product of the masked elements in that dimension.

If no elements contribute to a result value, that value is 1.
<Related>
Array-array operations, Array-scalar operations, ALL intrinsic function, ANY intrinsic function, COUNT intrinsic function, IALL intrinsic function, IANY intrinsic function, IPARITY intrinsic function, MAXLOC intrinsic function, MAXVAL intrinsic function, MINLOC intrinsic function, MINVAL intrinsic function, PARITY intrinsic function, Reduction intrinsic functions, SUM intrinsic function