Caligari
(Fresh Scripter)
2006-12-11 05:58 AM
Array Size

Hi,
I need to know the number of elements in an array (like Java's Array.getLength(array), for example) but I'm not sure how to go about it in Kixtart - couldn't find anything in the command reference or the BB. Is there a simple way to do this?
Cheers,
Hugh.


Glenn BarnasAdministrator
(KiX Supporter)
2006-12-11 06:02 AM
Re: Array Size

It's called UBound - Upper Bound of an array
Code:
$Array = 1,5,3,5
$X = UBound($Array)
$X ?

$X will contain "3" (arrays are zero-based)

Glenn


Caligari
(Fresh Scripter)
2006-12-11 06:06 AM
Re: Array Size

Just what I was after, thanks.