comp.lang.ada
 help / color / mirror / Atom feed
From: Alfred Hilscher <Alfred.Hilscher@icn.siemens.de>
Subject: Re: Getting Information already displayed on terminal window
Date: Fri, 19 Apr 2002 09:06:44 +0200
Date: 2002-04-19T09:06:44+02:00	[thread overview]
Message-ID: <3CBFC204.6A4F0250@icn.siemens.de> (raw)
In-Reply-To: Agnv8.43588$tZ1.8615160@news2-win.server.ntlworld.com



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?
> 
> I am executing an external program and want to read in the result of this
> from the output screen - can i??
> 
> Cheers
> 
> Fraz


Hi,

what exactly want you do, start another program from your own program
and catching its output, or simply start your program and write the
output to a file?

(I assume that you use widows as you mentioned AdaGide which is a
windows tool)

The later can be done by simply redirecting output as under Unix via ">"
(tested with NT 4.0)
e.g. MY_PROG > file.out 2> file.err

The first one can be done with anonymous pipes. For an example, download
the AdaGide sources and have a look into package body "RunChoices.adb".
Procedure "StartTheProcess" for the start with pipes and function
"ReadFromPipe" for how to get the result.



  parent reply	other threads:[~2002-04-19  7:06 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
2002-04-19  7:06 ` Alfred Hilscher [this message]
  -- 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