Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace - command - Is somthing wrong ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00779543
Message ID:
00779854
Vues:
20
>OK City and Suburb are fields and the table in a scan - enscan
>
>The offending code is:
>
>Replace city with "" for suburb = city
>
>What is now happening is it changes the first record the drops down to the last record ( eof())

It sounds like it is doing what you told it too... you seem to have your code structured like:
SCAN
   Replace city with "" for  suburb = city
ENDSCAN
Which to me would be more correct as:
Replace ALL city with "" for  suburb = city
OR
SCAN
   if suburb = city
      Replace city with "" for  suburb = city
   endif
ENDSCAN
OR

If you want to do other things in the loop, you may want to do:
SCAN FOR suburb = city
   Replace city with ""
ENDSCAN
FYI: This works the same in Fox 2.6 and VFP 7.0

BOb

>
>Ok I can stop this by either
>
>Replace city With "" while suburb = city
>
>or
>
>Replace next1 city with "" for suburb = city
>
>but as the default is next1 record it should not drop to eof()
>
>The only change to anything is a upgrade processor to AMD 1.8 I wonder if its somthing in the background.
>
>I have used this command on the command line and it does the same thing so I dont think is in the code as such.
>
>Any thoughts
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform