comp.lang.ada
 help / color / mirror / Atom feed
* Re: How to execure Unix scripts
  2000-07-20  0:00 How to execure Unix scripts Reinert Korsnes
@ 2000-07-20  0:00 ` Gisle S�lensminde
  2000-07-21  0:00 ` James S. Rogers
  1 sibling, 0 replies; 3+ messages in thread
From: Gisle S�lensminde @ 2000-07-20  0:00 UTC (permalink / raw)


In article <8l6mnl$2eh$1@news.uit.no>, Reinert Korsnes wrote:
>Hi,
>
>I did not find answer on this in my Ada95 literature:
>
>How do I execute a Unix script in Ada95 ?
>
>I am looking for something like the function "system" under Fortran.
>I also would like to run/start gnuplot under Ada and start and use
>results from octave/mathlab etc...

The 'system' function call is not a part of Fortran, but some 
fortran compilers links with the C library, where 'system' is found.

The 'system' call is neither a part of Ada, and you must either
import the 'sysyem' call, and link with the C library, or use
a (vendor-supplied) library. In gnat the package 'gnat.os_lib'
have a function spawn doing this, and that is easier to use than
an imported C function.

Starting gnuplot can be done this way, but limits comunication 
between the the Ada and gnuplot process to the command line of
gnuplot. If the problem require more comunication, a different 
approch must be used.

--
Gisle S�lensminde ( gisle@ii.uib.no )   

ln -s /dev/null ~/.netscape/cookies




^ permalink raw reply	[flat|nested] 3+ messages in thread

* How to execure Unix scripts
@ 2000-07-20  0:00 Reinert Korsnes
  2000-07-20  0:00 ` Gisle S�lensminde
  2000-07-21  0:00 ` James S. Rogers
  0 siblings, 2 replies; 3+ messages in thread
From: Reinert Korsnes @ 2000-07-20  0:00 UTC (permalink / raw)


Hi,

I did not find answer on this in my Ada95 literature:

How do I execute a Unix script in Ada95 ?

I am looking for something like the function "system" under Fortran.
I also would like to run/start gnuplot under Ada and start and use
results from octave/mathlab etc...

reinert

-- 
Norwegian Polar Institute
Polar Environment Center
N-9296 Tromso
Norway
Fax: +47 77750501

http://geophys.npolar.no/~reinert/personal.html




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to execure Unix scripts
  2000-07-20  0:00 How to execure Unix scripts Reinert Korsnes
  2000-07-20  0:00 ` Gisle S�lensminde
@ 2000-07-21  0:00 ` James S. Rogers
  1 sibling, 0 replies; 3+ messages in thread
From: James S. Rogers @ 2000-07-21  0:00 UTC (permalink / raw)



Reinert Korsnes wrote in message <8l6mnl$2eh$1@news.uit.no>...
>Hi,
>
>I did not find answer on this in my Ada95 literature:
>
>How do I execute a Unix script in Ada95 ?
>
>I am looking for something like the function "system" under Fortran.
>I also would like to run/start gnuplot under Ada and start and use
>results from octave/mathlab etc...


You will find an example of using the "system" call in the Unix C library
in the basic Ada programming examples at www.adapower.com.

Jim Rogers
Colorado Springs, Colorado   USA






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-07-21  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-20  0:00 How to execure Unix scripts Reinert Korsnes
2000-07-20  0:00 ` Gisle S�lensminde
2000-07-21  0:00 ` James S. Rogers

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