comp.lang.ada
 help / color / mirror / Atom feed
From: Hans Vlems <hvlems@freenet.de>
Subject: Re: Running programs using ADA
Date: Sat, 1 Dec 2012 13:49:23 -0800 (PST)
Date: 2012-12-01T13:49:23-08:00	[thread overview]
Message-ID: <45386ff5-dd28-4fca-9de5-d00473655b47@q5g2000vbp.googlegroups.com> (raw)
In-Reply-To: riy5e6gzzv52.p2ddmcvsv411.dlg@40tude.net

On 1 dec, 12:20, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
wrote:
> On Sat, 1 Dec 2012 01:33:14 -0800 (PST), Hans Vlems wrote:
> > the language does help in this case.
> > Because the mingw C compiler bindings rely on the libraries supplied
> > by Microsoft.
> > The systems I've got to work with have no support for the system()
> > function.
> > ADA can do without them and this allows me to run various command line
> > programs (with several options) without the need to have access to
> > cmd.exe (which is prohibited too).
>
> Strictly speaking Ada cannot do this. The standard Ada run-time library
> does not define any means to start a process for [good] reasons which are
> irrelevant here.
>
> Various existing solutions always rely on libraries, which are either
> compiler vendor-specific, like in the case of GNAT.OS_Lib, or OS-specific,
> e.g. Win32 bindings, or [sub]standard libraries providing functionality in
> a more or less OS-independent way, like POSIX , Glib, Qt.
>
> Note also that running processes is much more than merely spawning them.
> Usually you want to get the execution status, wait for completion, attach
> input/output/error pipes and so on.
>
> --
> Regards,
> Dmitry A. Kazakovhttp://www.dmitry-kazakov.de

Oh yes, I know it's outside the formal ADA language specification.
My reference manual is quite old (Ledgard's book from 1983) and on
multiprocessing it only mentions tasks.
That would only work for me if I'd written everything in ADA in the
first place. So that wasn't it.
My VAX/VMS manuals for ADA didn't help either so therefore I asked
here.
The only programming language I know that has built-in support to run
external programs and keep control
over them is Burroughs extended algol. As the name implies, that
language is tied to a hardware architecture
and thus no option. I've tried the GNAT.OS_lib and it works perfectly
well. All it needs to do is run a program
and have it control terminal input and output. Once it stops (or
crashes :) control returns to the ADA program
and the user can select another option. Trivial, but very important
for the small company I work for.
Thanks for tour help,
Hans



  reply	other threads:[~2012-12-01 21:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-30  7:56 Running programs using ADA Hans Vlems
2012-11-30  8:00 ` Nasser M. Abbasi
2012-11-30 12:54   ` Hans Vlems
2012-11-30 21:22 ` Per Sandberg
2012-12-01  9:33   ` Hans Vlems
2012-12-01 11:20     ` Dmitry A. Kazakov
2012-12-01 21:49       ` Hans Vlems [this message]
2012-12-02 11:22         ` Brian Drummond
2012-12-03  7:56           ` Hans Vlems
2012-12-03 12:03             ` Brian Drummond
2012-12-04  4:49               ` Randy Brukardt
2012-12-01 15:26 ` Anatoly Chernyshev
2012-12-01 21:50   ` Hans Vlems
replies disabled

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