Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Will the 'Fox is Dead' prophecies become self-fulfilling
Message
 
To
10/12/1999 09:28:37
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00301589
Message ID:
00301655
Views:
29
>How hard is it to run rings around a VFP app that is written
>as if it were still dBASE II? I see things like 30 fields being updated
>with the following syntax:
>
>REPLACE field1 WITH 1
>REPLACE field2 WITH 2
>...
>REPLACE field30 WITH 30
>
>instead of a single REPLACE field1 WITH 1, field2 WITH 2, ... field3 WITH 3
>

I have seen even better syntax instead of REPLACE ALL:

DO WHILE !EOF()
REPLACE field1 WITH value1
REPLACE field2 WITH value2
REPLACE field3 WITH value3
REPLACE field4 WITH value4
REPLACE field5 WITH value5

*....replace more fields

SKIP

LOOP

ENDDO

:)
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform