comp.lang.ada
 help / color / mirror / Atom feed
From: agate!howland.reston.ans.net!darwin.sura.net!aplcen.apl.jhu.edu!ngss3.jhu apl.edu!jw@ucbvax.Berkeley.EDU  (Jeff Wong x6599)
Subject: Re: ADA & VAX, anyone use both?
Date: 29 Sep 93 05:47:50 GMT	[thread overview]
Message-ID: <1993Sep29.054750.5020@aplcen.apl.jhu.edu> (raw)

In <28SEP199316453606@cl2.cl.uh.edu> swen1fbe@cl2.cl.uh.edu (Tim D.) writes:

>In article <28SEP199316231932@bambam.gsfc.nasa.gov>, nbssal@bambam.gsfc.nasa.g
ov (Stephe Leake) writes...
>>In article <2896ag$fhi@goanna.cs.rmit.oz.au>, t9314447@pitvax.xx.rmit.edu.au 
writes...
.
.
Lexicals discussion deleted
.
.
>>>   Secondly is there a 
>>>way of calling any dcl command from inside an ada program for example 
>>>"show users/full"
>> 

>Use the LIB.SPAWN function to spawn a DCL command in a subprocess.  The hard 
>part is communicating information back to Ada from the subprocess.

Just thought I'd summarize this one with a concise example ...
This is a simpler version of the followup to this by Michael Poole:


with CONDITION_HANDLING;
with LIB;
procedure ada_dir_size is
  SpawnStatus : CONDITION_HANDLING.COND_VALUE_TYPE;
begin
     Lib.SPAWN( STATUS => SpawnStatus,
                COMMAND_STRING => "DIR/SIZE");
end;

Can't get much simpler than this. You can monitor SpawnStatus for er
error handling, and can specify a temporary output file and read
the desired info back into your program. The above example, however,
would seem to adequately fulfill Cliff's (the original poster's) request.

jeff
jw@ddsdx2.jhuapl.edu

                 reply	other threads:[~1993-09-29  5:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

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