Core Function UBound

From Sputnik Wiki
Revision as of 12:38, 14 June 2015 by UberFoX (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UBound( <array/binary-array> )

Contents

Description

Returns the index of the highest element in an array .

Parameters

array/binary-array

The array to use.

OR

The binary variable to use.

Return Value

Success - Returns the highest index in the array/binary-array.

Failure - Returns -1.

Remarks

Although this gets the highest index it may not get how many items there are in the array use Count( <array/binary-array> ) for that.

If you want the lowest index instead of the highest use LBound( <array/binary-array> ) for that.

Example

$array = array ("One", "Two", "Three");
println("Highest index is: " . UBound($array) );
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox