comp.lang.ada
 help / color / mirror / Atom feed
From: "Torbjörn Karfunkel" <toka@prover.com>
To: comp.lang.ada@ada.eu.org
Subject: Yet another question on system calls(newbie question)
Date: Thu, 10 May 2001 17:44:25 +0200
Date: 2001-05-10T17:44:25+02:00	[thread overview]
Message-ID: <mailman.989509930.7705.comp.lang.ada@ada.eu.org> (raw)

Using the pragma Import method of calling non-Ada entities, am I only
allowed to define functions? How about procedures? What I want to do is
to create a text file, give this text file as a parameter to a C
program, and then wait until the C program finishes. By then it will
have produced another text file that I want to use.
Can I use a dummy result variable like the 'result' in the following
(from another mail):

procedure Command is

   function C_System(value : String) return integer;
   pragma Import(
         C, C_System, "system");

   result : integer;
begin
   result := C_System("pwd ");
   result := C_System(value => "acdsee D:\work\pictures\BP47.jpg ");
end Command;

/Torbj�rn Karfunkel






             reply	other threads:[~2001-05-10 15:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-10 15:44 Torbjörn Karfunkel [this message]
2001-05-10 16:20 ` Yet another question on system calls(newbie question) James Rogers
2001-05-10 21:03   ` Keith Thompson
2001-05-10 21:12     ` James Rogers
2001-05-10 21:12 ` Keith Thompson
2001-05-12  1:30 ` DuckE
  -- strict thread matches above, loose matches on Subject: below --
2001-05-10 19:40 Torbjörn Karfunkel
2001-05-11  7:18 Torbjörn Karfunkel
replies disabled

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