comp.lang.ada
 help / color / mirror / Atom feed
* Append files using TEXT_IO
@ 1990-06-11 18:12 Richard A Lehman, DMSTB
  1990-06-13 21:27 ` Edward Falis
  0 siblings, 1 reply; 3+ messages in thread
From: Richard A Lehman, DMSTB @ 1990-06-11 18:12 UTC (permalink / raw)


Subject: Appending to files using TEXT_IO...

We have a requirement to determine if a file exists within
the current users directory.  If the file does not exist
we create if and log network transactions to it.

However if the file does exist we wish to log network
transactions to the end of the existing file.  Using TEXT_IO
there are a number of procedures which manipulate files
such as RESET, SET_LINE_LENGTH, SKIP_LINE, etc.  There
is no straight forwared procedure for OPEN_APPEND.  

We are seeking out projects which have solved this problem
before and come up with a clean way of opening a file
within the TEXT_IO package and appending to the end of it.

Thanks in advance,

Richard A Lehman

Lockheed Engineering & Science Co.
2400 NASA Road 1
Houston, TX   77058
713.333.7074

lehman%asd.span@jpl-vlsi.arpa

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

* Re: Append files using TEXT_IO
       [not found] <24001@<900611181242>
@ 1990-06-13 13:49 ` stt
  0 siblings, 0 replies; 3+ messages in thread
From: stt @ 1990-06-13 13:49 UTC (permalink / raw)



Re: Appending to a text file.

Leaving out "append" was probably a bug in Ada83.
Many compilers have provided a mechanism for open-with-append,
by an appropriate FORM string.  Check out the Appendix F of
your favorite compiler.

If all else fails, try pragma Interface to gain access to
the Unix Seek and Write.  You should be able to prepare
a string for output using the Text_IO.Put(TO: out String; ...),
and then pass its address and length directly to Unix Write.

S. Tucker Taft
Intermetrics, Inc.
Cambridge, MA  02138

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

* Re: Append files using TEXT_IO
  1990-06-11 18:12 Append files using TEXT_IO Richard A Lehman, DMSTB
@ 1990-06-13 21:27 ` Edward Falis
  0 siblings, 0 replies; 3+ messages in thread
From: Edward Falis @ 1990-06-13 21:27 UTC (permalink / raw)



Doing things like opening a file in append mode, defining record sizes for
I/O etc are typically handled via the "form" parameter, and are vendor
specific. Check out Appendix F for the compiler you're using. The answer
(non-portable) may be there. - Ed Falis, Alsys

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

end of thread, other threads:[~1990-06-13 21:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1990-06-11 18:12 Append files using TEXT_IO Richard A Lehman, DMSTB
1990-06-13 21:27 ` Edward Falis
     [not found] <24001@<900611181242>
1990-06-13 13:49 ` stt

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