hi,
We've pointed this out to you in the past. :-)are you sure, i don't remmeber :)
thanks.
>>hi,
>>thank you,
>>i got fantastic code from MR Michel Fournier
>>
>>replace all no with recno()
>>
>>thanks.
>
>Yes I know. I'm just guiding you on best practice for when you DO NEED a loop. Your code was over-complicated and not needed, and there's a better way to write it. We've pointed this out to you in the past. :-)
>
>>
>>
>>
>>>>hi,
>>>>thank you very much,fantastic
>>>>save time and code.
>>>>i try as under it works but bad way.
>>>>
>>>>USE bill_value
>>>>GO top
>>>>m.no=1
>>>>
>>>>DO WHILE .t. AND !EOF()
>>>>replace no WITH m.no
>>>>skip
>>>>m.no=m.no+1
>>>>IF EOF()
>>>>EXIT
>>>>ENDIF
>>>>enddo
>>>
>>>Even IF it was the way to go, M, you're STILL using that a old-old loop construct. Much better is:
>>>
>>><pre>
>>>SCAN
>>> replace no WITH m.no
>>> m.no=m.no+1
>>>End SCAN
>>>
>>>
>>>and even the way you had it there was unneeded code:
>>>
>>>
>>>DO WHILE !EOF()
>>> replace no WITH m.no
>>> skip
>>> m.no=m.no+1
>>>enddo
>>>