Array in a type?

Blitz3D Forums/Blitz3D Beginners Area/Array in a type?

(tu) ENAY(Posted 2005) [#1]
Ok, unless I'm totally wrong, I've discovered you can't stick an array in a type:-

Type willywonka

field dim jamflans(6,7)
dim moobrains(4,5)

end type

Or can I? :)


Dazman(Posted 2005) [#2]
You can if you use a BlitzArray[]

But they can only be 1 dimensional :(


(tu) ENAY(Posted 2005) [#3]
How do I 'BlitzArray[]' ?


Dazman(Posted 2005) [#4]
Just use square brackets instead of normal brackets and miss out the Dim command (from memory):

Field jamflans[6]


(tu) ENAY(Posted 2005) [#5]
Doh I was trying Dim jamflans[6].
Thanks for the help mate :)