Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace number
Message
From
13/04/2006 05:45:16
 
 
To
13/04/2006 02:35:51
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01113267
Message ID:
01113301
Views:
13
>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
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform