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 ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user