Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is this legal in VFP?
Message
De
06/02/2008 13:47:58
 
 
À
06/02/2008 13:32:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01290122
Message ID:
01290131
Vues:
10
>About thirty years ago I was doing something such as this with DOS Basic.
>Can it be done in VFP or is a vfp array recommended?
>Or am I just old and I forgot?
>
>
>For RecordCount = 1 To TheEndOfTheFile
>Goto RecordCount
>NumericValue = Datafile.n1
>nFOO(RecordCount) = NumericValue &&  <<<<
>Next RecordCount
>
If nFoo is an array with enough elements this would be legal in the sense that it would work and would not generated any errors.

But it appears to be quite inefficient and inelegant. Without knowing anything else about the application, it would appear that COPY TO ARRAY or SELECT INTO ARRAY would do the same thing much more cleanly. Even a SCAN loop would be "better" code.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform