MINIMUM()

Top  Previous  Next

 

The MINIMUM() function returns the lowest value in a dynamic array.

 

 

Format

 

MINIMUM(dyn.array)

 

where

 

dyn.arrayis the dynamic array to be scanned.

 

 

The MINIMUM() function returns the lowest numeric value in a dynamic array that uses any of the five mark characters as separators. Non-numeric and null elements of dyn.array are ignored. If the entire dynamic array is null, a null string is returned.

 

The SYSTEM() function with key value 1088 (SYS$MAXMINPOS) can be used to retrieve the dynamic array position of the minimum element as a string formed from the field, value and subvalue numbers separated by value marks. If dyn.array is a null string, this function will return a null string. If there are multiple elements that have the minimum value, the position of the first one is returned. The positional information is undefined if dyn.array contains text marks or item marks.

 

 

Example

 

S = '61':@VM:'42':@FM:'71':@VM:'57'

CRT MINIMUM(S)

POS = SYSTEM(1088)

 

This program fragment searches S for the largest numeric value and displays the result (42). The POS variable will be set to the position at which this value was found as "1VM2VM1".

 

 

See also:

MAXIMUM()