Global Arrays?
Blitz3D Forums/Blitz3D Programming/Global Arrays?
| ||
how do I declare a global array? I think I've tried just about everything I can think of. |
| ||
Arrays are always global ;) |
| ||
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 |
| ||
Ross beat me to it... |
| ||
:D too slow little man ;) |
| ||
ok, that fixed one problem! :-) A little knowledge goes a long way.. Thanks! |
| ||
you can off course make Local Arrays (can only be dimmed with a constant index though) local someInts%[50] |
| ||
That's cool. I didn't know that. is it only 1 dimentional? |
| ||
Yeah, i'm sure it can only be one dimention. |
| ||
Yeah, it expects "]" otherwise.. What exactly though would THIS do:? Local ints%[20.10] compiles..... |