From: David C. Hoos, Sr. <david.c.hoos.sr@ada95.com>
To: juan95@hotmail.com
Subject: Re: How to make a Shell call !!
Date: 2000/02/23
Date: 2000-02-23T00:00:00+00:00 [thread overview]
Message-ID: <890b00$h24$1@nnrp1.deja.com> (raw)
In-Reply-To: 88v4m4$st67@psi-news.airtel.net
In article <88v4m4$st67@psi-news.airtel.net>,
"Juan Miguel Padilla i Salom" <juan95@hotmail.com> 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.
next prev parent reply other threads:[~2000-02-23 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-02-23 0:00 How to make a Shell call !! Juan Miguel Padilla i Salom
2000-02-23 0:00 ` David [this message]
2000-02-23 0:00 ` James S. Rogers
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox