How to access global variable EXPLICITLY

V

vikram.singh

Hi,
i have declared one global varibale named VAR1 in form module and
another defined in sub proecdure with the same name (VAR1) in the
same
form module . if i use VAR1 then local variable will be
accessed .......but if i wanna use the global variable explicitely in
the same procedure then how can i do that.

Regards,
Vikram
 
K

Klatuu

Give them different names. Some naming conventions specify variable names
should include a scope identifier:

gVar1 - Globla
mVar1 - Module
Var1 - Local

I don't use this myself, because I don't use global variables and only use
module level variables on a very limited basis.
 
G

Guest

You can qualify a variable with the name of the module
where it is declared:

a = module1.myvar
b = myform.myvar

But it's still not a good idea: change the name of one of the
variables.

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top