comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » the last line of a large file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: the last line of a large file [message #55327 is a reply to message #55246] Fri, 10 August 2007 10:39 Go to previous messageGo to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
On Aug 10, 11:00 am, Carsten Lechte <c...@toppoint.de> wrote:
> Conor wrote:
>> lol! Really! What in the world is the point of putting the number of
>> lines at the end of the file?
>
> One legitimate reason would be that sometimes you only know how much
> data you have until after you have processed it all, especially if the
> data sets are so large that you only ever have a small subset in RAM.

That's easily worked around. Write a dummy length at the beginning of
the file, process data until you reach the end of the file, then go
back to the beginning of the file are overwrite the dummy length with
the correct one. For ASCII format files, that requires being very
careful to make sure that the dummy length is a sufficiently long
string, and that the final length is padded with spaces (or leading
0s) to have exactly the same size.

There are obvious limitations to this technique (i.e. the output has
to be seekable); but not seem applicable in this context.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL resources
Next Topic: IDL resources on my Web page

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 17 21:31:23 PDT 2025

Total time taken to generate the page: 1.76178 seconds