MINIMUM Function
Returns the minimum numeric element in a dynamic array.
Syntax
MINIMUM(dynamicArray)
Syntax Elements
dynamicArray is the name of a dynamic array.
Comments
Array elements can contain non-numeric values, which are ignored. The functions 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 either an attribute mark (AM), a value mark (VM) or a subvalue mark (SVM).
Examples
EQU AM TO CHAR(254) ZIP = "92626":AM:"92714":AM:"92720" X = MINIMUM(ZIP)
Assigns the value 92626 to variable X.
EQU AM TO CHAR(254) EQU VM TO CHAR(253) EQU SVM TO CHAR(252) ARR = "4":AM:"3":VM:"67":VM:"9":SVM:"39":SVM:"11" Y = MINIMUM(ARR) PRINT Y
Prints the value 3, the minimum numeric value in dynamic array ARR.
W = "RECORD":AM:"":AM:"334" X = MINIMUM(W) PRINT X
Prints a zero, because null elements evaluate to zero.
A = "BOSTON":VM:"MA":AM:"SACRAMENTO":VM:"CA" B = MINIMUM(A)
B is assigned a null value, because there are no numeric values or nulls in the array.