DataBasic Reference > Statements and Intrinsic Functions > M > MINIMUM Function

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

Reality V15.0 ()

MINIMUM Function (DataBasic) (m618703+minimum_f.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

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.

RealityV15.0Comment on this topic