ORD-MAX

The ORD-MAX function returns a value that is the ordinal number position, in the argument list, of the argument that contains the maximum value.

The function type is integer.

Read syntax diagramSkip visual syntax diagram
Format

                        .------------.      
                        V            |      
>>-FUNCTION ORD-MAX--(----argument-1-+--)----------------------><

argument-1
Must be class numeric, alphanumeric, or alphabetic (Class boolean is not allowed).

If more than one argument-1 is specified, all arguments must be of the same class with the exception that the combination of alphabetic and alphanumeric arguments is allowed.

The returned value is the ordinal number that corresponds to the position of argument-1 having the greatest value in the argument-1 series.

The comparisons used to determine the greatest valued argument-1 are made according to the rules for simple conditions. For more information, see Conditional Expressions.

If more than one argument-1 has the same greatest value, the number returned corresponds to the position of the leftmost argument-1 having that value.

Related Information