11.07.2015 Views

Fortran 90 Handbook

Fortran 90 Handbook

Fortran 90 Handbook

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

AExamples.Case (i):The value of MAXLOC ((/ 2, 6, 4, 6 /)) is (2). If the array B isdeclaredA.66 MAXVAL (ARRAY, DIM, MASK)INTEGER, DIMENSION(4:7) :: B = (/ 8, 6, 3, 1 /)the value of MAXLOC (B) is (1).0 – 5 8 – 3Case (ii): If A has the value 3 4 – 1 2 , MAXLOC (A, MASK = A .LT. 6)1 5 6 – 4has the value (3, 2). Note that this is true even if A has a declaredlower bound other than 1.Optional Arguments. DIM, MASKDescription. Maximum value of the elements of ARRAY along dimension DIMcorresponding to the true elements of MASK.Class. Transformational function.Arguments.ARRAYDIM (optional)MASK (optional)must be of type integer or real. It must not be scalar.must be scalar and of type integer with a value in therange 1 ≤ DIM ≤ n where n is the rank of ARRAY. Thecorresponding actual argument must not be anoptional dummy argument.must be of type logical and must be conformable withARRAY.Result Type, Type Parameter, and Shape. The result is of the same type andkind type parameter as ARRAY. It is scalar if DIM is absent or ARRAY has rankone; otherwise, the result is an array of rank n – 1 and of shape ( d 1 , d 2 , ...,d DIM – 1 , d DIM + 1 , ..., d n ) where ( d 1 , d 2 , ..., d n ) is the shape of ARRAY.6<strong>90</strong> <strong>Fortran</strong> <strong>90</strong> <strong>Handbook</strong>Copyright © 1992 J. Adams, W. Brainerd, J. Martin, B. Smith, and J. Wagener

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!