comp.lang.ada
 help / color / mirror / Atom feed
* Text IO
@ 1995-04-22  0:00 Chris O'Regan
  1995-04-22  0:00 ` Tore Joergensen
  0 siblings, 1 reply; 12+ messages in thread
From: Chris O'Regan @ 1995-04-22  0:00 UTC (permalink / raw)



   I have two questions:

	1) When writing to a file, how can I force the output to be
	   written immediately so that I may monitor the program's
	   progress using ``tail -f'' on the file?


	2) Is it possible to get a single key?  If I use Text_IO's
	   ``Get'' function the user is required to press the enter
	   key after typing the appropriate key.  This is somewhat
	   inconvenient.


   Thanks, in advance, for the help.

-- 
     ____________________________________________________________
              Chris O'Regan <ct_orega@ECE.Concordia.CA>
     Computer Engineering, Concordia University, Montreal, Canada
           http://www.ECE.Concordia.CA/~ct_orega/addr.html




^ permalink raw reply	[flat|nested] 12+ messages in thread
* Text IO
@ 2001-08-28 16:19 Matt Raikes
  2001-08-28 16:28 ` martin.m.dowie
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Matt Raikes @ 2001-08-28 16:19 UTC (permalink / raw)


I was wondering how to convert integers and floats to strings for
output to text files...someone already suggested the following:

For convert Integers to/from Strings check out the
attributes 'Image (to) and 'Value (from)

I couldn't get this to work though.  Any other ideas??

thanks



^ permalink raw reply	[flat|nested] 12+ messages in thread
* TEXT_IO
@ 1988-05-11 16:46 Marcus Moehrmann
  0 siblings, 0 replies; 12+ messages in thread
From: Marcus Moehrmann @ 1988-05-11 16:46 UTC (permalink / raw)


Hello,
I have a question concerning TEXT_IO. Consider the following program:

with TEXT_IO;
use  TEXT_IO;
procedure TEST is
begin
--   SET_INPUT  (STANDARD_INPUT);    -- (1)
--   SET_OUTPUT (STANDARD_OUTPUT);   -- (1)
   DO_SOMETHING;
   PUT_LINE ("After doing something");   -- (2)
end TEST;

Now, LRM 14.3(5) states, that the standard IO files are open *at the
beginning* of the program execution and have the appropriate modes.

But what has to be done, if they cannot be opened because of
NAME_ERROR or USE_ERROR ? E.g. with VAX/VMS you can do the following:
   $ DEFINE ADA$OUTPUT <filename-which-raises-io-error-at-TEXT_IO.CREATE>
and something equal for ADA$INPUT. After that STANDARD_OUTPUT cannot
be opened at the beginning of the program execution. I think, the same
can be done in other operating-systems like UNIX or MS/DOS.

Now the question is, *when* to raise the IO error, e.g. NAME_ERROR ?
During elaboration of TEXT_IO, at first use of STANDARD_IO ?

This is what happens with VAX Ada V1.4-33:

   If statements (1) are active, NAME_ERROR will be raised here 

   If statement (1) are commented out, NAME_ERROR will be raised at (2),
   after doing something else.
   
Therefor in Vax Ada statements (1) are neccessary to prevent doing
something after the beginning of the program execution but befor an IO
statement is reached. I feel, that there must not be a difference if
statements (1) are active or not (commented out).


*** Marcus Moehrmann                |  UUCP:    marcus@fkihh.UUCP ***
*** (TeX: M\"{o}hrmann)             |  PHONE:   +49-40-4123-2573  ***
*** Univ of Hamburg, W. Germany     |           +49-40-5202464    ***

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

end of thread, other threads:[~2001-09-03 12:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-04-22  0:00 Text IO Chris O'Regan
1995-04-22  0:00 ` Tore Joergensen
  -- strict thread matches above, loose matches on Subject: below --
2001-08-28 16:19 Matt Raikes
2001-08-28 16:28 ` martin.m.dowie
2001-08-28 16:47 ` Marin David Condic
2001-08-28 18:33 ` Ted Dennison
2001-08-29  8:50 ` John McCabe
2001-09-01  1:15   ` Robert Dewar
2001-09-03  8:23     ` John McCabe
2001-09-03 11:11       ` David C. Hoos, Sr.
2001-09-03 12:05         ` John McCabe
1988-05-11 16:46 TEXT_IO Marcus Moehrmann

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