C
Chip Orange
I've tried declaring a public variable in a module of my project in hope
that it can be accessible by any of the forms; I mean that I'd like a form
to be able to initialize it, or have access to it's value if it's
initialized by a routine in the modules section.
While this compiles for me, I'm getting a runtime error that indicates the
object variable isn't initialized when accessed by a form, but declared and
initialized by a module.
If I add a second initialization statement in the form itself then all runs
ok.
I obviously don't understand the scoping rules here, so could someone
explain to me if it's possible to have a variable accessible everywhere
(that is, have it be static?).
I did try declaring it using the STATIC command in the module but the
compiler wouldn't allow that.
thanks.
Chip
that it can be accessible by any of the forms; I mean that I'd like a form
to be able to initialize it, or have access to it's value if it's
initialized by a routine in the modules section.
While this compiles for me, I'm getting a runtime error that indicates the
object variable isn't initialized when accessed by a form, but declared and
initialized by a module.
If I add a second initialization statement in the form itself then all runs
ok.
I obviously don't understand the scoping rules here, so could someone
explain to me if it's possible to have a variable accessible everywhere
(that is, have it be static?).
I did try declaring it using the STATIC command in the module but the
compiler wouldn't allow that.
thanks.
Chip