>>if VFP9 don't optimize STR(), it is not a bug, it is correct.
>>Of course, with current index routines, VFP8 and VFP9b can return wrong results when you use a STR().
>>
>>On next example, STR() blank zero numbers.
>>
>
>
>VFP doesn't optimize STR(cExpr,nLen) makes
a disastrous impact on existing projects. If nLen is a literal constant, it should be optimized. This should also be true for LEFT(), REPLICATE(), LEFT(), RIGHT(),...
>
>That is, VFP should optimize a query matching an index expression like:
>INDEX ON STR(iField,4) TAG TT
>
>and does not optimize a query matching the following:
>INDEX ON STR(iField,iField) TAG TT
>
>
>Ben
Hi Ben,
Yes, it is bad that STR() is not optimized when it should be. It is limited to inexact comparison only, i.e. SET ANSI is OFF. Is that the type of comparison you were targeting in your projects?
Thanks,
Aleksey.