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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,97a0fb5b3a5bcf2f X-Google-Attributes: gid103376,public From: dennison@telepath.com Subject: Re: Passing a Command to Unix in Ada Date: 1999/02/09 Message-ID: <79q8p8$u0u$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 442528143 References: <36BCB222.EF9B4FF7@physics.BLAH.purdue.BLAH.edu> <79n0a7$3op$1@nnrp1.dejanews.com> <36C06B04.3E2D7A1F@physics.BLAH.purdue.BLAH.edu> X-Http-Proxy: 1.0 x12.dejanews.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Tue Feb 09 21:19:47 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.5 [en] (WinNT; I) Date: 1999-02-09T00:00:00+00:00 List-Id: In article <36C06B04.3E2D7A1F@physics.BLAH.purdue.BLAH.edu>, "Robert T. Sagris" wrote: > I'm sorry my terminology was a bit off when I wrote this. > I meant the system function in stdlib.h. > If its not in there I don't know how my c program should work. > The only header file this program includes are stdio.h and stdlib.h. > So, it would seem system and rename are not being called be a OS > specific libraries. Am misinterpreting the std part in stdlib as meaning > STANDARD or am I confused. > > dennison@telepath.com wrote: > > > > In article <36BCB222.EF9B4FF7@physics.BLAH.purdue.BLAH.edu>, > > "Robert T. Sagris" wrote: > > > I was wondering if there are any functions similar to the system > > > command in C available in Ada. Also I was wondering if there was > > There is no "system" command in C. Many OS'es have a system call named A couple of folks have written to me to point out that "system", although not a proper statement like "break" and "for", is indeed required to exist for C implementations by the ANSI C standard. So I must apologize for causing any confusion there. But the point is that it is a library routine that should be callable from any language that knows how to link to it, not a command unique to C that is unavailable outside of it. On the Unix system I have access to it is located in libc.a. Ada has a standard way of importing C routines. The trick is linking to libc.a, which you will have to consult your compiler docs to figure out how to do. If you have trouble figuring it out, post specifics (compiler/Platform/OS) and someone here may be able to help out. Also, some compiler implementations provide an interface to "system" out of the box... T.E.D. -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own