comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <Stephen.Leake@gsfc.nasa.gov>
Subject: Re: Executing Command Line Strings From Ada95/GNAT
Date: 1997/08/01
Date: 1997-08-01T00:00:00+00:00	[thread overview]
Message-ID: <33E1E7DC.A6B@gsfc.nasa.gov> (raw)
In-Reply-To: 97073110303193@psavax.pwfl.com


Marin David Condic, 561.796.8997, M/S 731-96 wrote:
> 
>     ... I would like a procedure which will take a string argument
>     and execute it as a C-Shell or MS-DOS command. I have not seen
>     anything immediately obvious in the documentation - perhaps it
>     involves building a binding to some system routine(s). (I'm not
>     terribly familiar with the system calls for either OS at the
>     moment - I *write* operating systems, not *use* them ;-)
> 
>     If someone knows of some method to do this or has any suggestions,
>     I'd appreciate hearing from you. Thanks.

Yes, you have to use a system call.

In the Win32.hlp file, lookup ShellExecute; it seems to do what you
want, but as a Windows application, not an MS-DOS app. I haven't used
it, so I may be wrong. I think to run a real MS-DOS command, you can
call ShellExecute and specify the command string "COMMAND.COM /C
<command string>"; check the DOS help on COMMAND.COM for details.

The semi-standard C library way of doing this is the "system" function;
there may be one in the cygwin32 system, and there should be one under
Solaris.
> 
>     MDC
> 
-- 
- Stephe




      reply	other threads:[~1997-08-01  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-07-31  0:00 Executing Command Line Strings From Ada95/GNAT Marin David Condic, 561.796.8997, M/S 731-96
1997-08-01  0:00 ` Stephen Leake [this message]
replies disabled

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