>>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,
May I ask why you're using STR() to index and not another function?
George
Ubi caritas et amor, deus ibi est