From: Rob Norris <firstname.lastname@baesystems.com>
Subject: Text Processing in Ada 95
Date: Wed, 21 Feb 2007 18:09:09 +0000
Date: 2007-02-21T18:09:09+00:00 [thread overview]
Message-ID: <l22pt2114r910becfeg00e1dl1vb7flesq@4ax.com> (raw)
Suppose I have a text file such as:
tom
dick
harry
Then I want to insert the line "dave" after tom so the file is
tom
dave
dick
harry
Also suppose text file can get rather large.
Currently I'm using text_io which means I have to copy the whole thing into memory, insert the line
then over write the file with new contents. direct_io is not an option (varing string lengths)
What alternatives should I consider for making insertions faster?
(NB retrieval of a line needs to be fairly quick as well).
Thanks in advance.
next reply other threads:[~2007-02-21 18:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-21 18:09 Rob Norris [this message]
2007-02-21 19:07 ` Text Processing in Ada 95 Pascal Obry
2007-02-22 14:02 ` Larry Kilgallen
2007-02-21 20:16 ` Randy Brukardt
2007-02-22 2:45 ` Jeffrey R. Carter
2007-02-22 11:56 ` Rob Norris
2007-02-23 4:30 ` Jeffrey R. Carter
2007-02-23 13:51 ` Stephen Leake
2007-02-26 12:11 ` Rob Norris
2007-02-23 4:55 ` Steve
2007-02-23 5:19 ` Randy Brukardt
2007-02-23 7:53 ` Jacob Sparre Andersen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox