Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to count number of lines in text file?,
Message
 
 
À
10/11/2000 21:09:16
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00440122
Message ID:
00440648
Vues:
19
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform