TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
"Beard, Frank" <[log in to unmask]>
Reply To:
Beard, Frank
Mon, 20 Nov 2000 21:10:31 -0500
text/plain (36 lines)
I assume you're on a Windows platform.  Depending on
who's compiler you're using, some supply packages for
doing that.

I use our POSIX binding to do the equivalent operations.
Pascal Obry published a free binding.  I don't remember
his page, but there is a link to it from AdaPower at then click the "Source Code" button,
then click the "Reuse" button at the top of the window.
Then go down to the "Links/Bindings" category, and follow
the "Posix for Win32" link.

Another option would be to use the Windows API, WinExec,
to execute the dos commands.  A DIR command, for example,
could be put into the LPCSTR string as "dir c:\ > dir.dat"
and passed to WinExec.  Your program could then read the
results from the dir.dat file.


-----Original Message-----
From: Doran, Steven [mailto:[log in to unmask]]
Sent: Monday, November 20, 2000 7:57 PM
To: [log in to unmask]
Subject: OS calls

Does anyone know if it is possible to call dos commands (i.e. dir, copy,
mkdir, etc) from within
a Ada program?

Steven Doran
Litton Guidance & Control
[log in to unmask]