Global Arrays?

Blitz3D Forums/Blitz3D Programming/Global Arrays?

CoolPops(Posted 2004) [#1]
how do I declare a global array? I think I've tried just about everything I can think of.


Ross C(Posted 2004) [#2]
Arrays are always global ;)


bradford6(Posted 2004) [#3]
all arrays are global:

Const MAXFOOS = 10
Dim foo(MAXFOOS)

For i = 1 To MAXFOOS
	  foo(i) = Rnd(2,10)	
	Next


Print_foos()


Function print_foos()
	For i = 1 To MAXFOOS
	  Print foo(i)
	Next

End Function



bradford6(Posted 2004) [#4]
Ross beat me to it...


Ross C(Posted 2004) [#5]
:D too slow little man ;)


CoolPops(Posted 2004) [#6]
ok, that fixed one problem! :-) A little knowledge goes a long way.. Thanks!


aab(Posted 2004) [#7]
you can off course make Local Arrays (can only be dimmed with a constant index though)

local someInts%[50]


Craig H. Nisbet(Posted 2004) [#8]
That's cool. I didn't know that.

is it only 1 dimentional?


Ross C(Posted 2004) [#9]
Yeah, i'm sure it can only be one dimention.


aab(Posted 2004) [#10]
Yeah, it expects "]" otherwise..

What exactly though would THIS do:? Local ints%[20.10]
compiles.....