[Gambas-user] Some file/use or progress bar questions.

Frank Cox theatre at ...2012...
Mon Feb 2 21:43:43 CET 2009


On Mon, 02 Feb 2009 21:40:49 +1100
richard terry wrote:

> 1) I have a file with some 30,000 lines, but I want to know how many lines are 
> in the file before I do anything to it - is this possible. I couldn't see how 
> just looking at the syntax for files.

If your line lengths are random, then you won't know how many lines you have
unless you read through the file and count them.

If your line lengths are fixed, then you can simply divide the file size by
the line length to get the number of lines.

-- 
MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com
DRY CLEANER BUSINESS FOR SALE ~ http://www.canadadrycleanerforsale.com




More information about the User mailing list