This does the same thing right?

BlitzMax Forums/BlitzMax Programming/This does the same thing right?

arrays are treated as objects in Bmax and have a length field, so it's not truly "the same thing" although, the indexing methods are the same (as AngelDaniel mentioned.)

Strict

Global blah:Float[] = New Float[25]
blah[1] = 53235

Function test(obj:Object)
Print Float[](obj)[1] 'the cast is necessary because you can't index an object
EndFunction

test(blah)


Traditionally an array is just a pointer to the first element, correct. Of course, there is some "behind the scenes stuff too", the compiler stores the size of the array somewhere ( array.length in Bmax).