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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b4c37b70e721c0a6 X-Google-Attributes: gid103376,public From: David C. Hoos, Sr. Subject: Re: How to make a Shell call !! Date: 2000/02/23 Message-ID: <890b00$h24$1@nnrp1.deja.com>#1/1 X-Deja-AN: 588760044 References: <88v4m4$st67@psi-news.airtel.net> To: juan95@hotmail.com X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt) X-Http-Proxy: 1.1 x31.deja.com:80 (Squid/1.1.22) for client 158.252.123.153 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Feb 23 09:58:25 2000 GMT X-MyDeja-Info: XMYDJUIDdhoossr Reply-To: david.c.hoos.sr@ada05.com Newsgroups: comp.lang.ada Date: 2000-02-23T00:00:00+00:00 List-Id: In article <88v4m4$st67@psi-news.airtel.net>, "Juan Miguel Padilla i Salom" wrote: > Hello, I wanted to know how can i make a shell call!! > > somehing like system("dir"); on a c++ program. Here's an example of how to do it, with a library-level function interfaced to the "system" call in the C run-time library: 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; Sent via Deja.com http://www.deja.com/ Before you buy.