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 X-Google-Thread: 103376,fe7baeda96251197 X-Google-Attributes: gid103376,public From: gisle@apal.ii.uib.no (Gisle S�lensminde) Subject: Re: How to execure Unix scripts Date: 2000/07/20 Message-ID: #1/1 X-Deja-AN: 648600818 Content-Transfer-Encoding: 8bit References: <8l6mnl$2eh$1@news.uit.no> Organization: University of Bergen, Norway Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-07-20T00:00:00+00:00 List-Id: 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