Core Function LBound
From Sputnik Wiki
(Difference between revisions)
UberFoX (Talk | contribs)
(Created page with "<pre> LBound( <array/binary-array> ) </pre> === Description === Returns the index of the lowest element in an array . === Parameters === ==== array/binary-array ==== The arr...")
Newer edit →
(Created page with "<pre> LBound( <array/binary-array> ) </pre> === Description === Returns the index of the lowest element in an array . === Parameters === ==== array/binary-array ==== The arr...")
Newer edit →
Revision as of 15:13, 19 August 2013
LBound( <array/binary-array> )
Contents |
Description
Returns the index of the lowest element in an array .
Parameters
array/binary-array
The array to use.
OR
The binary variable to use.
Return Value
Success - Returns the lowest 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 highest index instead of the lowest use UBound( <array/binary-array> ) for that.
Example
$array = array ("One", "Two", "Three"); println("Lowest index is: " . LBound($array) );