Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is this legal in VFP?
Message
From
06/02/2008 13:47:58
 
 
To
06/02/2008 13:32:32
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01290122
Message ID:
01290131
Views:
9
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform