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,3efdba4872d0fe9e X-Google-Attributes: gid103376,public From: "David C. Hoos, Sr." Subject: Re: Calling EXEs from ADA95 Date: 2000/03/23 Message-ID: #1/1 X-Deja-AN: 601259989 Content-Transfer-Encoding: 7bit References: <022ad336.6a710f8a@usw-ex0109-066.remarq.com> Content-Type: text/plain; charset="iso-8859-1" X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 953811306 158.252.122.232 (Thu, 23 Mar 2000 03:35:06 PST) Organization: Ada95 Press, Inc. MIME-Version: 1.0 NNTP-Posting-Date: Thu, 23 Mar 2000 03:35:06 PST Newsgroups: comp.lang.ada Date: 2000-03-23T00:00:00+00:00 List-Id: SoVieTiK wrote in message news:022ad336.6a710f8a@usw-ex0109-066.remarq.com... > Can someone tell me how to call a executable (DOS) from > ada? In general, you can execute a shell command from an Ada executable by means of an interface to the "system" function from the C runtime library. Here is a library-level procedure that does just that with Interfaces.C; function Execute_Shell_Command (The_Command_String : String) return Interfaces.C.Int is package C renames Interfaces.C; function System (S : C.Char_Array) return C.Int; pragma Import (C, System, "system"); begin return System (C.To_C (The_Command_String)); end Execute_Shell_Command;