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-Thread: 103376,eceaf04ab9f6c9eb X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.81.98 with SMTP id z2mr371878pax.19.1354310567906; Fri, 30 Nov 2012 13:22:47 -0800 (PST) Path: 6ni20413pbd.1!nntp.google.com!news.glorb.com!news-out.readnews.com!transit3.readnews.com!s09-11.readnews.com!unm2.readnews.com.POSTED!not-for-mail X-Trace: DXC=I2^]8B7j25[I[UfBM:e;>5amoafHGg3 Newsgroups: comp.lang.ada Subject: Re: Running programs using ADA Message-ID: <20121130222242.7841f869@lufsen.sandat.dyndns.org> References: X-Newsreader: Claws Mail 3.8.1 (GTK+ 2.24.8; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Organization: readnews.com - News for Geeks and ISPs NNTP-Posting-Host: fbab05da.newsreader.readnews.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Date: 2012-11-30T22:22:42+01:00 List-Id: 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 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