Am I using this array right?

BlitzMax Forums/BlitzMax Beginners Area/Am I using this array right?

Adam Novagen(Posted 2015) [#1]
I'm still a little hazy on certain declaration practices in Max, so I want to check something. Let's say I declare an array that will contain a non-numeric data type like TImage, but I want it to have a preset number of elements, for example 2. Which of these is the correct way to initialize it?

Global image:TImage[2]

Global image:TImage[Null,Null]



GW(Posted 2015) [#2]
Global image:TImage[2]

If you want an array that holds 2 images then this is ok.


Global image:TImage[Null,Null]

This is not valid.


Adam Novagen(Posted 2015) [#3]
Gotcha, thanks.