Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Will the 'Fox is Dead' prophecies become self-fulfilling
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00301589
Message ID:
00301655
Vues:
28
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform