Fortran Wiki max

Description

Returns the argument with the largest (most positive) value.

Standard

FORTRAN 77 and later

Class

Elemental function

Syntax

result = max(a1, a2 [, a3 [, ...]])

Arguments

• a1 - The type shall be integer or real.
• a2, a3, … - An expression of the same type and kind as a1.

Return value

The return value corresponds to the maximum value among the arguments, and has the same type and kind as the first argument.