comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
To: <comp.lang.ada@ada.eu.org>
Cc: <mollberg@hotmail.co>
Subject: Re: run external .exe files within an ada program..
Date: Wed, 4 Jul 2001 10:59:11 -0500
Date: 2001-07-04T10:59:11-05:00	[thread overview]
Message-ID: <mailman.994262345.19004.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: 9e5f0431.0107040609.27c9a661@posting.google.com

[-- Attachment #1: Type: text/plain, Size: 690 bytes --]

The attachment is an Ada95 binding to the C function "system."

The binding is portable across operating systems -- i.e., it's not
limited to Win32 platforms.

----- Original Message -----
From: "Henrik M�llberg" <mollberg@hotmail.com>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada.eu.org>
Sent: July 04, 2001 9:09 AM
Subject: run external .exe files within an ada program..


> how do I do that? does it exist any counterparts to "system" in perl or
something?
>
> (I'm developing in win32 environment)
>
> regards,
> Henrik
> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada.eu.org
> http://ada.eu.org/mailman/listinfo/comp.lang.ada
>

[-- Attachment #2: execute_shell_command.adb --]
[-- Type: application/octet-stream, Size: 404 bytes --]

------------------------------------------------------------------------
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;

  parent reply	other threads:[~2001-07-04 15:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-04 14:09 run external .exe files within an ada program Henrik Möllberg
2001-07-04 14:46 ` Alfred Hilscher
2001-07-04 15:59 ` David C. Hoos, Sr. [this message]
2001-07-05 12:50   ` wzm
2001-07-05 13:30   ` Ted Dennison
  -- strict thread matches above, loose matches on Subject: below --
2001-07-10 22:16 Beard, Frank
replies disabled

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