Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace X with Y... FOR.... or WHILE?
Message
From
31/12/2002 15:55:57
 
 
To
31/12/2002 15:23:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00737061
Message ID:
00737071
Views:
21
This message has been marked as a message which has helped to the initial question of the thread.
>Hi all... this may be a silly question, but what is the difference between using a FOR or a WHILE clause? Both are expressions that must evaluate to .T., so when should one be used over the other?
>TIA for your time.

FOR replaces ALL records that match the criteria, WHILE only replaces from the current record pointer up to the first record that does NOT match the criteria - it will ignore all subsequent records.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform