DataBasic Reference > Statements and Intrinsic Functions > M > MAXIMUM 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.

RealityV15.1Online Documentation (MoTW) Revision 7

MAXIMUM Function (DataBasic) (m618703+maximum_f.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

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.

RealityV15.1 (MoTW) Revision 7Comment on this topic