From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,90557de632b4af52 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-18 12:14:52 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Getting Information already displayed on terminal window Date: 18 Apr 2002 15:07:41 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1019157236 19662 128.183.220.71 (18 Apr 2002 19:13:56 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 18 Apr 2002 19:13:56 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:22744 Date: 2002-04-18T19:13:56+00:00 List-Id: Peter Hermann writes: > Fraz 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