From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dea5cfbb62015319 X-Google-Attributes: gid103376,public From: dewarr@my-dejanews.com Subject: Re: Spawn() Date: 1998/09/20 Message-ID: <6u2pm4$qqr$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 392956206 References: X-Http-Proxy: 1.0 x7.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Sun Sep 20 11:41:56 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/2.02 (OS/2; I) Date: 1998-09-20T00:00:00+00:00 List-Id: In article , 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. 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. The above documentation *should* be all that an Ada programmer needs to call Spawn, so the important thing is to fill in the missing knowledge. You mention that you are confused with "all those access types", but, assuming you basically know what an access type *is*, it is not easy to guess exactly what is confusing you. The more precisely you can formulate your question, the more accurate an answer can be given. -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum