I'm trying to avoid using GOSUB's etc as in DBPro Funtions are the preferred way forward.
One thing I'm trying to find out about is the possibility of Global Variables, which can be accessed within a Function. (My main need is to access arrays within a function).
Something i'm working on has an array of 20,20 which contains maze data. I'd like to reference that from within a Function.
With Non changing variables i know i can use #CONSTANT, is there any way of making a variable global so it can be used inside a function.
Below is an example of what i'd like to achieve.
DIM MyArray(3)
MyArray(1)=1
ChkFun()
FUNCTION ChkFun()
PRINT "MyArray(1)=";MyArray(1)
WAIT KEY
ENDFUNCTION
I'm just not sure if it's possible.
Thanks for any help.
Jas