XL Fortran for AIX 8.1

Language Reference

MAX(A1, A2, A3, ...)

Maximum value.


Elemental function

Result Type and Attributes

Same as the arguments. (Some specific functions return results of a particular type.)

Result Value

The value of the result is that of the largest argument.


MAX (-9.0, 7.0, 2.0) has the value 7.0.

If you evaluate MAX (10, 3, A), where A is an optional array argument in the calling procedure, PRESENT(A) must be true in the calling procedure.

Specific Name Argument Type Result Type Pass As Arg?
AMAX0 any integer (1) default real no
AMAX1 default real default real no
DMAX1 double precision real double precision real no
QMAX1 REAL(16) REAL(16) no
MAX0 any integer (1) same as argument no
MAX1 any real (2) default integer no


  1. IBM Extension: the ability to specify a nondefault integer argument.

  2. IBM Extension: the ability to specify a nondefault real argument.

[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]