Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Low level file functions to get the number of lines
Message
De
22/07/1997 19:20:47
 
 
À
22/07/1997 19:18:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00041205
Message ID:
00041241
Vues:
32
>The fastest method is to count the number of characters. If you count the number of lines you always have to read the file twice.
>
>nRead=0
>nFileLength=fseek(nFileHandle, 0, 2)
>=fseek(nFileHandle, 0, 0) && go top
>
>** DO WHILE NOT EOF
> nRead=nRead+MyReadLine(nFileHandle, ...) && returns lenghts of line
> SetThermometer(100 * nRead / nFileLength)

Yes, this is what I have implemented. The thermometer is not regular but works fine until 100%.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform