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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,92640d662fc31a03 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-04 01:13:22 PST Path: newsfeed.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!nntp.kreonet.re.kr!usenet.seri.re.kr!not-for-mail From: L.H.Jeong Newsgroups: comp.lang.ada Subject: Re: howto make system calls (newbie question) Date: Fri, 04 May 2001 17:16:23 +0900 Organization: System Engineering Research Institute (SERI) Message-ID: References: NNTP-Posting-Host: 203.241.48.20 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Newsreader: Forte Agent 1.8/32.548 Xref: newsfeed.google.com comp.lang.ada:7139 Date: 2001-05-04T17:16:23+09:00 List-Id: On Fri, 4 May 2001 09:51:45 +0200, Lars Lundgren wrote: >Hi there, > >How do I execute other programs from within ada? > >I.e how do I convert - for example - the following C program to ada? > >#include > >main(){ > printf("Files in Directory are:\n"); > system("ls -l"); >} > >Thanx, >/Lars L > here is an example !! procedure Command is function C_System(value : String) return integer; pragma Import( C, C_System, "system"); result : integer; begin result := C_System("pwd "); result := C_System(value => "acdsee D:\work\pictures\BP47.jpg "); end Command;