The Dim command

Archives Forums/MacOS X Discussion/The Dim command

Seb67(Posted 2009) [#1]
Hi everyone.

Why can't I use the Dim command on MaxIDE for Mac Intel ?

thanks


xlsior(Posted 2009) [#2]
...Because Dim doesn't exist in Blitzmax.

You declare an array like any other variable, for example, these are all valid:

Global A:Int[100]
Local B:String[20]
Local C:Int[10,10]
Global D:Float[10,10,2,2]


Seb67(Posted 2009) [#3]
Thank you very much.

a:Int[100,100]

a[1,1]=15
a[1,2]=25
a[2,1]=67

...


xlsior(Posted 2009) [#4]
That'll work, but note that you will need the local/global when you're running in strict or superstrict mode (which is highly recommended, since it's much better at catching problems in your program)


Brucey(Posted 2009) [#5]
Yes. Add SuperStrict to the top of your source, and you'll be good to go :-)