> >
> > If you do not use the mDot, VFP has to figure out where the variable comes from. For example:
> >
> > REPLACE MyTable.MyField with cSomeValue IN [MyTable]
> >
> > Where does cSomeValue come from? Is it SomeOtherTable.cSomeValue or is it a memory variable. If you prefix the variable with mDot, VFP knows that it is a memory variable. This makes it a tick or two faster (and in a long loop, it this could add up to something significant) and it tells another developer at a glance that this is a memory variable.
> >
> > Ken
>
> Ken,
> Thanks for the education
> Please does the m.dot make the variable public?
>
> Leslie Botchway
> Ghana
Hi Leslie,
I just recently learned about the use of m dot, and also I learn it here in foxite, but I think I am right in saying that using it to properly name a variable does not automatically makes it public. It is, as I understood, used so that VFP can easily implicitly determine that that is indeed a variable. Being a certain variable public or local still requires your declaration.
Local VarLocal
Public VarPublic
When you use it later:
m.Varlocal = "This variable is local"
m.VarPublic = "This variable is public or global"
So using Ken's example:
REPLACE MyTable.MyField with m.VarLocal IN [MyTable]
Tells VFP that m.VarLocal is plain variable, which in our example, a local one.
HTH :-)