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
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.

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

Registered: 2003-01-28
Posts: 4290
Loc: New Jersey
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
_________________________
Actually I am a Rocket Scientist! \:D

Top
#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.
Top
Page 1 of 1 1


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

Who's Online
1 registered (Bryce) and 183 anonymous users online.
Newest Members
gkustra, emnipetro, Hirze, thequeen, ameliaryan
17642 Registered Users

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

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org