2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
20 .. index:: maximum value
22 MAX --- Maximum value of an argument list
23 *****************************************
25 .. function:: MAX(A1, A2 , A3 , ...)
27 Returns the argument with the largest (most positive) value.
30 The type shall be ``INTEGER`` or
33 :param A2}, {A3}, ...:
34 An expression of the same type and kind
35 as :samp:`{A1}`. (As a GNU extension, arguments of different kinds are
39 The return value corresponds to the maximum value among the arguments,
40 and has the same type and kind as the first argument.
49 .. code-block:: fortran
51 RESULT = MAX(A1, A2 [, A3 [, ...]])
65 - Fortran 77 and later
69 - Fortran 77 and later
73 - Fortran 77 and later
77 - Fortran 77 and later
81 - Fortran 77 and later