Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to count number of lines in text file?,
Message
 
 
To
10/11/2000 21:09:16
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00440122
Message ID:
00440648
Views:
12
>Hi,
> Thank you for your reply.
> Hehehee.... actually I need both!!! Because I try to use both in my application since both of them has it own strength!!
>
>Thank you

Hi John,

I start forgetting VB, because I work now with VFP (one language is primary :). I don't remember (and lazy to check :), if VB has analogue of VFP occurs?

Anyway, you have to read file to string first.
In VFP it's very easy:
?occurs(chr(13),filetostr('mytext.txt')) (assuming file is less than 16MB).
BTW, alines() may blow up if you have more than 65000 lines in your file.
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