Array size?

BlitzMax Forums/BlitzMax Programming/Array size?

JoshK(Posted 2006) [#1]
local a[]
a[0]=n
a[1]=n

How do I tell how many items are in array a[]?


skidracer(Posted 2006) [#2]
Print Len a

or

Print a.length


Dreamora(Posted 2006) [#3]
a.length

But yours would fail. You need to declare the size of the array, either:

local a[10] OR
local a[] = new int[10]


JoshK(Posted 2006) [#4]
Thnx