MAXIMUM Function

Returns the maximum numeric element in a dynamic array.

Syntax

MAXIMUM(dynamicArray)

Syntax Elements

dynamicArray is the name of a dynamic array.

Comments

Array elements can contain non-numeric values, which are ignored. The function returns a null if all array elements are non-numeric and non-null.

Null elements evaluate to zero.

Array delimiters do not need to be the same character, but they must be an attribute mark (AM), a value mark (VM) or a subvalue mark (SVM).

Examples

EQU AM TO CHAR(254)
A = "1":AM:"2":AM:"7":AM:"5"
B = MAXIMUM(A)

Assigns a 7, which is the maximum numeric value in array A, to variable B.

EQU AM TO CHAR(254)
EQU VM TO CHAR(253)
EQU SVM TO CHAR(252)
S="TEST":VM:"1":AM:"DATE":VM:"3":SVM:"14":SVM:"86"
T = MAXIMUM(S)
PRINT T

Prints the value 86, which is the maximum numeric value in string S.

EQU AM TO CHAR(254)
Q = "THIS":AM:"IS":AM:"FRIDAY"
P = MAXIMUM(Q)

P is assigned a null value, because there are no numeric values or nulls in the array.