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 01:33:14 -0800 (PST)
Date: 2012-12-01T01:33:14-08:00	[thread overview]
Message-ID: <14df4e2f-0259-4ce0-8d5f-7a4c9964de96@g6g2000vbk.googlegroups.com> (raw)
In-Reply-To: 20121130222242.7841f869@lufsen.sandat.dyndns.org

On 30 nov, 22:22, Per Sandberg <per.sandb...@sandat.dyndns.org> wrote:
> Well the language wont help since this is an operating system issue,
> however the interfaces that you are allowed to use may be accesible
> from your application using libraries such as (GNAT.Expect or
> GNAT.OS_Lib) using Ada in gcc, or (ProcessBuilder) using java-SE or
> using fork in C or using module subprocess in python.
>
> The selection of implementation depends on the requirements..
>
> /P
>
>  On Thu, 29 Nov 2012 23:56:13 -0800 (PST)
>
>
>
> Hans Vlems <hvl...@freenet.de> wrote:
> > Our company will move its IT operation to another datacentre. The new
> > provider doesn't allow access to the command prompt (cmd.exe, it's a
> > Windows setup). We use aprox. 10 programs that are run from the
> > command prompt. All software is written in C; the compiler is mingw
> > (regularly updated). The first attempt was a program, in C, that shows
> > the user a menu. The user types a single digit and a program is run.
> > The C program relies on the system() function.
> > The problem is that the new environment uses Windows on a 64 bit
> > platform. mingw uses Microsoft's libraries and either I'm just too
> > dumb to understand that new stuff or system() is broken.
> > Now mingw also includes support for ADA. The last time I wrote
> > something in ADA was in 1984. Anyway, ADA looks a lot more like Algol
> > than C so I hope that ADA may help me here. More specifically: does
> > ADA have support for a function similar to C's system()?
>
> > Example:
>
> > int main(void)
> > {
> >    int retval;
> >    retval=system("copy h:\*.* g:\");
> >    printf("return value %d\n",retval);
> >    return EXIT_SUCCESS;
> > }
>
> > Regards,
> > Hans Vlems
>
> > PS
> > the example lacks #include statements so won't compile- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

Hi Per, 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).
Hans



  reply	other threads:[~2012-12-01  9:33 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 [this message]
2012-12-01 11:20     ` Dmitry A. Kazakov
2012-12-01 21:49       ` Hans Vlems
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