comp.lang.ada
 help / color / mirror / Atom feed
* How to execute DOS command from an Ada program ?
@ 2003-06-19 12:46 Nose Red
  2003-06-19 13:02 ` Vinzent Hoefler
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Nose Red @ 2003-06-19 12:46 UTC (permalink / raw)


Hi,

I am using Ada95 to develop a tool which will execute/call a DOS batch file.
Anyone knows how ? Thanks





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to execute DOS command from an Ada program ?
  2003-06-19 12:46 How to execute DOS command from an Ada program ? Nose Red
@ 2003-06-19 13:02 ` Vinzent Hoefler
  2003-06-19 13:47   ` Nose Red
  2003-06-19 17:05 ` tmoran
  2003-06-20  4:33 ` Martin Krischik
  2 siblings, 1 reply; 6+ messages in thread
From: Vinzent Hoefler @ 2003-06-19 13:02 UTC (permalink / raw)


Nose Red wrote:

>I am using Ada95 to develop a tool which will execute/call a DOS batch file.
>Anyone knows how ?

If you use GNAT you may take a look at GNAT.OS_Lib and the Spawn
procedure/function there. For executing a batch file you may also need
Getenv to retrieve the name of the command processor (environment
variable COMSPEC) to let it execute the batch.


Vinzent.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to execute DOS command from an Ada program ?
  2003-06-19 13:02 ` Vinzent Hoefler
@ 2003-06-19 13:47   ` Nose Red
  0 siblings, 0 replies; 6+ messages in thread
From: Nose Red @ 2003-06-19 13:47 UTC (permalink / raw)


Yes, i found the Spawn oper, it may be the one i need.

Much thanks for your support, Vinzent.

--Kim

"Vinzent Hoefler" <ada.rocks@jlfencey.com> wrote in message
news:bcscbe$mjcn9$1@ID-175126.news.dfncis.de...
Nose Red wrote:

>I am using Ada95 to develop a tool which will execute/call a DOS batch
file.
>Anyone knows how ?

If you use GNAT you may take a look at GNAT.OS_Lib and the Spawn
procedure/function there. For executing a batch file you may also need
Getenv to retrieve the name of the command processor (environment
variable COMSPEC) to let it execute the batch.


Vinzent.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to execute DOS command from an Ada program ?
  2003-06-19 12:46 How to execute DOS command from an Ada program ? Nose Red
  2003-06-19 13:02 ` Vinzent Hoefler
@ 2003-06-19 17:05 ` tmoran
  2003-06-20  4:33 ` Martin Krischik
  2 siblings, 0 replies; 6+ messages in thread
From: tmoran @ 2003-06-19 17:05 UTC (permalink / raw)


>I am using Ada95 to develop a tool which will execute/call a DOS batch file.
That obviously depends on the OS you are on (Mac, Unix?)
Therefore it isn't part of the standard for all Ada compilers.
But it's very commonly needed.
So your compiler vendor surely has supplied some library functions to do it.
Remember that Ada is not limited to MS Windows systems.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to execute DOS command from an Ada program ?
  2003-06-19 12:46 How to execute DOS command from an Ada program ? Nose Red
  2003-06-19 13:02 ` Vinzent Hoefler
  2003-06-19 17:05 ` tmoran
@ 2003-06-20  4:33 ` Martin Krischik
  2003-06-24 11:38   ` Nose Red
  2 siblings, 1 reply; 6+ messages in thread
From: Martin Krischik @ 2003-06-20  4:33 UTC (permalink / raw)


Nose Red wrote:

> Hi,
> 
> I am using Ada95 to develop a tool which will execute/call a DOS batch
> file. Anyone knows how ? Thanks

Since you are using GNAT you might want to take a look at:

http://adacl.sourceforge.net/html/______Include__AdaCL-OS-Command__adb.htm

for details on how to use spawn or download AdaCL at:

http://adacl.sourceforge.net

With Regards Martin

-- 
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to execute DOS command from an Ada program ?
  2003-06-20  4:33 ` Martin Krischik
@ 2003-06-24 11:38   ` Nose Red
  0 siblings, 0 replies; 6+ messages in thread
From: Nose Red @ 2003-06-24 11:38 UTC (permalink / raw)


Thanks for helpful information. By using GNAT Spawn and Getenv operations,
I've finished my task without problem, it is so...o easy !!!

Again thank you all for the great support

So long ...





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-06-24 11:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-19 12:46 How to execute DOS command from an Ada program ? Nose Red
2003-06-19 13:02 ` Vinzent Hoefler
2003-06-19 13:47   ` Nose Red
2003-06-19 17:05 ` tmoran
2003-06-20  4:33 ` Martin Krischik
2003-06-24 11:38   ` Nose Red

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