From: tp@odn.de (Thomas Preymesser)
Subject: Re: Spawn()
Date: 1998/09/26
Date: 1998-09-26T00:00:00+00:00 [thread overview]
Message-ID: <360cf12c.25420365@news.nuernberg.odn.de> (raw)
In-Reply-To: 6u2pm4$qqr$1@nnrp1.dejanews.com
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2197 bytes --]
On Sun, 20 Sep 1998 11:41:56 GMT, dewarr@my-dejanews.com wrote:
Hi.
>In article <B229FC4896684F827@194.45.232.5>,
> t.preymesser@msn.sub.org (Thomas Preymesser) wrote:
>> Hi.
>>
>> Can someone show me an example how to use the procedure
>> "Spawn" in gnat?
>> I'm a little bit confused with these access-types.
>
>The documentation on how to use such routines is always
>found in the package specification in the corresponding
>g-xxx.ads file (use gnatkr to find the file name):
>
> type Argument_List is array (Positive range <>) of String_Access;
> -- Type used for argument list in call to Spawn. The lower bound
> -- of the array should be 1, and the length of the array indicates
> -- the number of arguments.
>
> type Argument_List_Access is access all Argument_List;
> -- Type used to return an Argument_List without dragging in secondary
> -- stack.
>
> procedure Spawn
> (Program_Name : String;
> Args : Argument_List;
> Success : out Boolean);
> -- The first parameter of function Spawn is the full path name of the
> -- executable. The second parameter contains the arguments to be passed
> -- to the program. Success is false if the program could not be spawned
> -- or its execution completed unsuccessfully. Note that the caller will
> -- be blocked until the execution of the spawned program is complete.
yes, i have read these specs but they don't describe how to use the
procedures - they describe the function of a procedure/function and
the types of the parameters.
>Rather than give an example, which then is likely to get
>copied without real understanding, why not ask a specific
>question as to what is unclear in the above.
OK, how can i convert a list of Parameters of type string to a
variable of type Parameter_List?
What�s the problem with giving an example for a specific
function-call? Nearly all man-pages of C-functions shows an example of
how to use the function?
> The above
>documentation *should* be all that an Ada programmer needs
>to call Spawn,
Sure, but i am an experienced C programmer, not an experienced Ada
programmer who knows all aspects of the Ada language.
-Thomas
next prev parent reply other threads:[~1998-09-26 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-09-20 0:00 Spawn() Thomas Preymesser
1998-09-20 0:00 ` Spawn() dewarr
1998-09-26 0:00 ` Thomas Preymesser [this message]
1998-09-27 0:00 ` Spawn() dewarr
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox