>Hi Mike,
>
>Thanks for the advice on using the m.lcVar instead of "&". I'm used to using it (&) in clipper programming, but now I know it has different results with VFP9. Just wondering what's the use of "m." in m.lcVar?
>
>Thanks again and I hope I'm not asking too much for advices. All your help are greatly appreaciated.
>
m.lcVar returns the content of the variable.
&lcVar compiles the variable.
Using & for such simple stuff is terrible!!!! and if I'm not mistaken it was similarly bad in Clipper. There are very few places where & is necessary. Find out what those are and only use it in those cases. Otherwise avoid it like whatever horrible disease most scares you.
lcVar = "00008"
a=SECONDS()
FOR m.x = 1 TO 100000
m.c=&lcVar
ENDFOR
?SECONDS()-m.a
?m.c
a=SECONDS()
FOR X = 1 TO 100000
m.c=m.lcVar
ENDFOR
?SECONDS()-m.a
?m.c
Try that code. Pay attention to the content of m.c after the & version. It is not the same as m.c after the second version.
On my machine the & version is 7 times slower than the m.
HTH