Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How get the Number of Lines from a text file
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00451983
Message ID:
00451994
Views:
29
Depends on how big your file is. If it's big enough, the array will definitely take longer because VFP will throw an error and stop. ;-)

>>
>>create cursor Dummy (TxtFld C (250))
>>append from TextFile SDF
>>nLines = Reccount()
>>
>
>Alternatively, there's:
>
>lsMyString = filetostr("foxpro.h")
>alines(laMyArray, lsMyString)
>?alen(laMyArray)
>
>
>Beats me which one's faster. I'll leave that as an exercise for the reader. :-)
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform