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/08 Message-ID: <79n0a7$3op$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 441842580 References: <36BCB222.EF9B4FF7@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: Mon Feb 08 15:36:41 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.5 [en] (WinNT; I) Date: 1999-02-08T00:00:00+00:00 List-Id: 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 (sigh.) There is no "system" command in C. Many OS'es have a system call named "system" that does what you describe, providing you link in the proper OS library. OS routines can be used in Ada by declaring their subprogram specification and following it up with a "pragma import" statement. Linking in OS libraries is a compiler-specific thing; consult your compiler docs for more information. This is similar to C, except for the "pragma" part. C just *assumes* that any function you declared but didn't complete will be linked in later. That makes calling OS routines like "system" a bit simpler, but it also can cause problems linking when the developer forgets to code a routine. T.E.D. -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own