comp.lang.ada
 help / color / mirror / Atom feed
From: Steven Hovater <nh-ho@mediaone.net>
Subject: Re: Passing a Command to Unix in Ada
Date: 1999/02/19
Date: 1999-02-19T00:00:00+00:00	[thread overview]
Message-ID: <36CDCC36.630D3811@mediaone.net> (raw)
In-Reply-To: 36C06B04.3E2D7A1F@physics.BLAH.purdue.BLAH.edu

If you're using something like Apex, you can access the POSIX implementation to do
an exec etc. Let me know if you need sample code -

Cheers,
Steve


"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" <robs@physics.BLAH.purdue.BLAH.edu> 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

--
Steven Hovater
svh@rational.com
Software Engineering Consultant
Phone/fax:781-676-2565/2500
Rational Software
Pager: 888-906-2209
83 Hartwell Ave, Lexington, MA                                             Amateur
radio: AA1YH






  parent reply	other threads:[~1999-02-19  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-06  0:00 Passing a Command to Unix in Ada Robert T. Sagris
1999-02-07  0:00 ` Thomas Preymesser
1999-02-08  0:00 ` dennison
1999-02-09  0:00   ` Robert T. Sagris
1999-02-09  0:00     ` dennison
1999-02-09  0:00     ` dennison
1999-02-09  0:00       ` Larry Kilgallen
1999-02-13  0:00         ` Lieven Marchand
1999-02-19  0:00     ` Steven Hovater [this message]
1999-02-19  0:00       ` robert_dewar
1999-02-09  0:00 ` David C. Hoos, Sr.
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox