>Which these two are better,faster,etc.
>
>IF (NOT SEEK(UPPER(expr)))
>...
>ENDIF
> or
>m.var = UPPER(expr)
>IF (NOT SEEK(m.var))
>...
>ENDIF
>
>
>Regards
>Bhavbhuti
I think, too, that the first method is slightly faster, but that it isn't worthwhile to optimize in this case. Use whatever looks more readable to you. Personally, I prefer the first approach. BTW, you can eliminate the outer parentheses in both cases (some other languages require them, but not VFP).
The following piece of code can help you compare the speed of anything you want to test:
lnStart = seconds()
for i = 1 to 10000
next
? "Option 1:", seconds() - lnStart
Regards, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)