TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Proportional Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Content-Type:
text/plain; charset="iso-8859-1"
Sender:
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Subject:
From:
"Beard, Frank" <[log in to unmask]>
Date:
Mon, 20 Nov 2000 21:10:31 -0500
MIME-Version:
1.0
X-To:
"Doran, Steven" <[log in to unmask]>
Reply-To:
"Beard, Frank" <[log in to unmask]>
Parts/Attachments:
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
http://adapower.com 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.

Frank

-----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]

ATOM RSS1 RSS2