comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Re: [Q] Operating System Command Interface
Date: 1998/05/05
Date: 1998-05-05T00:00:00+00:00	[thread overview]
Message-ID: <6in54g$jc9$1@polo.advicom.net> (raw)
In-Reply-To: 6ims5j$1vo@gcsin3.geccs.gecm.com


You're right, but the solution is simple.  I use the following library
function:
with Ada.Characters.Latin_1;
with System;
function Execute_Shell_Command
           (The_Command : String) return Integer is
   function Execute
              (The_Command_Address : System.Address) return Integer;
   pragma Import (C, Execute, "system");
   The_Nul_Terminated_Command_String : constant String :=
     The_Command & Ada.Characters.Latin_1.Nul;
begin
   return Execute (The_Nul_Terminated_Command_String'Address);
end Execute_Shell_Command;
David C. Hoos, Sr.

John McCabe wrote in message <6ims5j$1vo@gcsin3.geccs.gecm.com>...
>Am I right in thinking that, as standard, Ada has no direct perating
>system command interface akin to the C "System" call?
>
>--
>Best Regards
>John McCabe
>
>=====================================================================
>Any opinions expressed are mine and based on my own experience. They
>  should in no way be taken as the opinion of anyone I am currently
>     working with, or of the company I am currently working for.
>       If you have a problem with anything I say, SPEAK TO ME!
>                (remove "nospam." to reply by e-mail)
>=====================================================================
>
>






  reply	other threads:[~1998-05-05  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-05  0:00 [Q] Operating System Command Interface John McCabe
1998-05-05  0:00 ` David C. Hoos, Sr. [this message]
1998-05-05  0:00   ` John McCabe
1998-05-05  0:00     ` Robert Dewar
1998-05-05  0:00 ` Do-While Jones
1998-05-08  0:00   ` Nick Roberts
1998-05-05  0:00 ` Markus Kuhn
1998-05-05  0:00   ` David C. Hoos, Sr.
1998-05-05  0:00 ` Stanley R. Allen
1998-05-05  0:00   ` Andi Kleen
1998-05-06  0:00     ` Markus Kuhn
1998-05-05  0:00   ` John McCabe
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox