Call global function from within Delphi class's method
Is it possible to call global methods from within a class where they are obscured by member functions of the same name?
I know in C++ you have the following sy开发者_C百科ntax:
int var = 0;
void temp() {
int var = 2;
::var = var;
} //Global var is set to 2
Yes you can by using the name of the unit instead of ::
Like:
unit1.var := 2;
See for more details: http://delphi.about.com/od/beginners/l/aa060899.htm
You can try
UnitName.VarName := 2
精彩评论