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: "David C. Hoos, Sr." Subject: Re: Running external programs in ADA. Date: 1999/02/25 Message-ID: <7b3okp$3e6@hobbes.crc.com>#1/1 X-Deja-AN: 448357184 References: X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: Coleman Research Corporation Newsgroups: comp.lang.ada Date: 1999-02-25T00:00:00+00:00 List-Id: Matthew Butt wrote in message ... >Hi all... > >Does anyone know how I can call an external program in Ada? > >I need to do a bit of text processing, call a UNIX command and then do a >bit more processing and call another program. > Well... you need to define the problem more completely. Ada can do all of the things a C program can do. For example, it can execute a shell command via the "system" C-library function, or "fork," wait for child process completion, etc., etc. Here are (at least some of) the questions that need to be answered, viz.: 1. Do you need to wait until the UNIX command completes before proceeding? 2. Do you need results from the UNIX command to be used in your continued processing? 3. If the answer to (2.) is "yes," are these results binary or text, and how do you propose to communicate them? 4. You speak of "UNIX command" and "another program." Are these terms as used by you synonymous?