I have two functions that need a LOCAL variable (Index)
that keeps the value it had from the last call.
So I used:
DIM Index AS GLOBAL LONG
This works fine.
Then I noticed that i accidentally deleted the declaaration from ONE
of the functions and yet the program still compiled!
As the variable name is the same in the other functions I assumed
that somehow the declaration in one function is covering the other
function
Is this a bug?
If not is the value of this variable going to be the same
in each very different function?
If it is the same what happens when I declare Index in each function
as a GLOBAL variable?
------------------
Kind Regards
Mike
that keeps the value it had from the last call.
So I used:
DIM Index AS GLOBAL LONG
This works fine.
Then I noticed that i accidentally deleted the declaaration from ONE
of the functions and yet the program still compiled!
As the variable name is the same in the other functions I assumed
that somehow the declaration in one function is covering the other
function
Is this a bug?
If not is the value of this variable going to be the same
in each very different function?
If it is the same what happens when I declare Index in each function
as a GLOBAL variable?
------------------
Kind Regards
Mike
Comment