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,FREEMAIL_FROM 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 Received: by 10.180.95.227 with SMTP id dn3mr232782wib.1.1354354394685; Sat, 01 Dec 2012 01:33:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.49.58.140 with SMTP id r12mr1054257qeq.35.1354354394234; Sat, 01 Dec 2012 01:33:14 -0800 (PST) Path: ha8ni98571wib.1!nntp.google.com!m1no11167251wiv.0!postnews.google.com!g6g2000vbk.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 1 Dec 2012 01:33:14 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: g6g2000vbk.googlegroups.com; posting-host=87.209.50.192; posting-account=Od-2dQoAAAB0Ax1n9anxOF811WhPXsCz NNTP-Posting-Host: 87.209.50.192 References: <20121130222242.7841f869@lufsen.sandat.dyndns.org> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E),gzip(gfe) Message-ID: <14df4e2f-0259-4ce0-8d5f-7a4c9964de96@g6g2000vbk.googlegroups.com> Subject: Re: Running programs using ADA From: Hans Vlems Injection-Date: Sat, 01 Dec 2012 09:33:14 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-12-01T01:33:14-08:00 List-Id: On 30 nov, 22:22, Per Sandberg 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 > > =A0On 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) > > { > > =A0 =A0int retval; > > =A0 =A0retval=3Dsystem("copy h:\*.* g:\"); > > =A0 =A0printf("return value %d\n",retval); > > =A0 =A0return EXIT_SUCCESS; > > } > > > Regards, > > Hans Vlems > > > PS > > the example lacks #include statements so won't compile- Tekst uit oorsp= ronkelijk 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