comp.lang.ada
 help / color / mirror / Atom feed
From: Per Sandberg <per.sandberg@sandat.dyndns.org>
Subject: Re: Running programs using ADA
Date: Fri, 30 Nov 2012 22:22:42 +0100
Date: 2012-11-30T22:22:42+01:00	[thread overview]
Message-ID: <20121130222242.7841f869@lufsen.sandat.dyndns.org> (raw)
In-Reply-To: bf847917-09d2-42c2-a848-39f6036ad20d@y6g2000vbb.googlegroups.com

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 <hvlems@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





  parent reply	other threads:[~2012-11-30 21:22 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 [this message]
2012-12-01  9:33   ` Hans Vlems
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