Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is this legal in VFP?
Message
 
À
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:
01290130
Vues:
11
Grady,

Provided that you initialize both the array and the record count, I do not see any problem, but... I would not use it at all, SCAN would be much better
TheEndOfTheFile = reccount()
dimension nFoo(TheEndOfTheFile)

For RecordCount = 1 To TheEndOfTheFile
Goto RecordCount
NumericValue = Datafile.n1
nFOO(RecordCount) = NumericValue &&  <<<<
Next RecordCount

* but this would be better
dimension nFoo(reccount())
lcOrder = tag()
set order to
scan
nFOO(RecordCount) = Datafile.n1
endscan
set order &lcTag
>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
>
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform