comp.lang.ada
 help / color / mirror / Atom feed
* Text Processing in Ada 95
@ 2007-02-21 18:09 Rob Norris
  2007-02-21 19:07 ` Pascal Obry
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Rob Norris @ 2007-02-21 18:09 UTC (permalink / 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.



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-02-26 12:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-21 18:09 Text Processing in Ada 95 Rob Norris
2007-02-21 19:07 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox