Max is a function that will work on either INTEGER or REAL arguments.
The max function will return the maximum value of all the arguments passed to it. Please take note that the max function can have ( in theory ) an unlimited number of arguments passed to it.
max ( A1,A2,A3,..... )
The argument A1 can either be an INTEGER argument or a REAL argument.
A2, A3 and however many other arguments that get passed to the function all must be of the same type as A1.
There are no optional arguments to this function.
The following variables (except x5 which will be the variable the function outputs to ) are going to get passed to the max function:
x1 = 6.6 x2 = -19.6 x3 = 289.5 x4 = -92.0 x5 = 0.0 x5 = max(x1,x2,x3,x4)
Naturally, the value of 289.5 is stored in x5.
Please note that integers or floating point numbers can also be passed to this function. For example:
x5 = max(5.4,-99.8,-1234.5)
will have the result of storing the value of 5.4 in x5.
The max function is actually a generic name for a group of Fortran intrinsic functions. There are specific function names like AMAX0 ( for integer values ) and AMAX1 ( for real values ). Please see lecture seven for more information.
Examples: array1.f, debug.f, charvar.f
Written by Jason Wehr : email@example.com and Maintained by John Mahaffy : firstname.lastname@example.org