Page 1 of 1 1
Topic Options
#171309 - 2006-12-11 05:58 AM Array Size
Caligari Offline
Fresh Scripter

Registered: 2006-12-08
Posts: 7
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?

#171310 - 2006-12-11 06:02 AM Re: Array Size [Re: Caligari]
Glenn Barnas Administrator Offline
KiX Supporter

Registered: 2003-01-28
Posts: 4301
Loc: New Jersey
It's called UBound - Upper Bound of an array
$Array = 1,5,3,5
$X = UBound($Array)
$X ?

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

Actually I am a Rocket Scientist! \:D

#171311 - 2006-12-11 06:06 AM Re: Array Size [Re: Glenn Barnas]
Caligari Offline
Fresh Scripter

Registered: 2006-12-08
Posts: 7
Just what I was after, thanks.
Page 1 of 1 1

Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 190 anonymous users online.
Newest Members
Romanc, Neurosine, Mads_H, Michael78, PaulBesafeglobal
17664 Registered Users

Generated in 0.066 seconds in which 0.029 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google: