comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov>
Subject: Re: Getting Information already displayed on terminal window
Date: 18 Apr 2002 15:07:41 -0400
Date: 2002-04-18T19:13:56+00:00	[thread overview]
Message-ID: <uvgaovn9e.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: a9m1f7$f0i$2@news.uni-stuttgart.de

Peter Hermann <ica2ph@iris16.csv.ica.uni-stuttgart.de> writes:

> Fraz <fraz@totalise.co.uk> wrote:
> > I notice that Ada Gide has an option which redirects the output to
> > a file if desired. How do i build this into my program?

The output functions in Ada.Text_IO come in two forms:

procedure Put_Line (File : in File_Type; Item : in String);
procedure Put_Line (Item : in String);

The first form takes an explicit file to output to, the second goes to
Ada.Text_IO.Current_Output. 

Ada.Text_IO.Current_Output defaults to "standard output", but you can
set it to any other valid file.

So you have two options; you can write your code to use explicit
files, or you can set Ada.Text_IO.Current_Output at the beginning of
your program, possibly based on a command line argument.

If you use explicit files, you should consider passing the file name
as a command line argument.

-- 
-- Stephe



  parent reply	other threads:[~2002-04-18 19:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-17 23:09 Getting Information already displayed on terminal window Fraz
2002-04-18  8:51 ` Peter Hermann
2002-04-18 11:32   ` Fraz
2002-04-18 13:58     ` Mark Johnson
2002-04-18 19:07   ` Stephen Leake [this message]
2002-04-19  7:06 ` Alfred Hilscher
  -- strict thread matches above, loose matches on Subject: below --
2002-04-18 22:04 Gautier Write-only-address
replies disabled

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