Skip to main content

This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRISOpens in a new window, see the InterSystems IRIS Migration Guide and Migrating to InterSystems IRIS, both available on the WRC Distributions pageOpens in a new window (login required).

MAXIMUM

Returns the largest numeric value from the elements of a dynamic array.

Synopsis

MAXIMUM(dynarray)

Arguments

dynarray An expression that resolves to a dynamic array of numeric values.

Description

The MAXIMUM function compares the values of all of the elements in a dynamic array and returns the largest numeric value. The MAXIMUM function compares all dynamic array values, regardless of the dynamic array levels of the elements. If an element value is missing or has a null string or non-numeric value, MAXIMUM parses its value as 0 (zero).

Examples

The following example uses the MAXIMUM function to return the largest numeric value in a dynamic array:

a=10:@FM:9:@VM:8:@SM:7
PRINT MAXIMUM(a);    ! returns 10
Copy code to clipboard

See Also

FeedbackOpens in a new window