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,21411b112f7858cc X-Google-Attributes: gid103376,public From: Steve Quinlan Subject: Re: Running external programs in ADA. Date: 1999/02/25 Message-ID: <36D58583.63CD3358@lmco.com>#1/1 X-Deja-AN: 448378844 Content-Transfer-Encoding: 7bit References: Content-Type: text/plain; charset=us-ascii Organization: Lockheed-Martin Air Traffic Management Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-02-25T00:00:00+00:00 List-Id: In the simplest case, you would define a function spec: function system (cmd : in string) return integer; and implement it by pragma import (C, system). Pass the command to be executed in the cmd parameter, adding an "&" if you don't want to block, (and an ASCII nul always). To be more correct, use the appropriate types out of interfaces.C(.*) for int and string. That helps in converting Ada strings to C char arrays. Check your system to see which shell the system call executes the command under -- this can make a difference!