Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is this legal in VFP?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01290122
Message ID:
01290136
Views:
11
BTW, the funny thing is that I didn't realize we're talking about arrays at first glance at the code. I thought he is executing some function :)

Too much struggling with SubVersion, DataGrids, etc. :)


>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
>>
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform