Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Low level file functions to get the number of lines
Message
From
22/07/1997 19:20:47
 
 
To
22/07/1997 19:18:06
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00041205
Message ID:
00041241
Views:
34
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform