we can 'Use' a variable with/without declaration.
e.g. we can:
abc = dtos(date())
Messagebox(abc)
orLocal abc
abc = dtos(date())
Messagebox(abc)
orLocal abc
abc = dtos(date())
Messagebox(m.abc)
What is the different between abc and m.abc?!
What is the different on Declare Local or Not?!
For my observe, if using recusion without Local declaration,
problem will come out!
setAllFonts()
Lparameters SetObject, nFontsize
For iX = 1 to SetObject.Controlcount
if Pemstatus(SetObject.controls[iX], "Fontsize", 5)
SetObject.controls[iX].fontsize = nFontsize
endif
if Pemstatus(SetObject.controls[iX], "Controlcount", 5)
SetAllFonts(Object.controls[iX], nfontsize)
endif
EndFor
The problem comes in inner recusion as the iX variable will reset to 1 again but afterwards, when back to outer loop.
the iX variable may smaller than previous value!
This is because the variable still not out of scope!
but there will work fine if there is line:
Local iX && in the prg file! ^_^;
Another thing on Macros,
abc = Dtos(Date())
what are different on:
abc, (abc), &abc, (&abc), and also "&abc"
which should be used on value!?
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.