I like to try to keep any production code free from any warnings just in case something goes wrong its one less thing to look at but am struggling with the use of the GLOBAL command.
I assume all the globals should be set right at the top of the program and is as simple as
GLOBAL variable_name
for everything used that is a global variable
The example gives
GLOBAL array_name[]
for defining arrays but if I try
GLOBAL array_name[][]
I get syntax error.
How do you define a 2 and 3 dimensional array as a global?
Thanks
Gary
Hi!
Your solution is:
//define the array
Global array[]
//set the array dimensions
DIM array[4][3]
ah thanks for that, I did try that and it seemed to work but wondered if because it was defined in the global as a single dimension and then set as a 2 dimension if it would cause problems
Beware you can access multidimensional Variabkes as single-dimensions and GLB will not say anything.
A[12]=A[12][0]