comp.lang.ada
 help / color / mirror / Atom feed
* Re: DOS Command in OA
  1999-08-04  0:00 DOS Command in OA KdoMFueSys Wilhelmshaven
@ 1999-08-04  0:00 ` David C. Hoos, Sr.
  1999-08-06  0:00   ` czgrr
  1999-08-04  0:00 ` Ted Dennison
  1999-08-04  0:00 ` Gautier
  2 siblings, 1 reply; 11+ messages in thread
From: David C. Hoos, Sr. @ 1999-08-04  0:00 UTC (permalink / raw)



KdoMFueSys Wilhelmshaven <mfuesys.admin@nwn.de> wrote in message
news:37A80902.1454720B@nwn.de...
> Hallo,
> we've implemented a screen_io package in order to ease basic in- and
> output based upon ESC-Seqeunces using ANSI.SYS as it was described
> formerly in this group.
> What we are trying now, is to change the screen's text-resolution from
> 80x25 to 80x50, e.g. with dos command
> mode co80 50.
> What we are trying is to invoke this call from within our ada-code.
>
> Our question is:
> Is there any possible solution, to invoke DOS-Commands from within
> Object-Ada-Code?
> And if not, is there any possibility to change screen's text-resolution
> from 80x25 to 80x25?
>
> We are using WIN95 and Aonix Object Ada 7.1.

At the end of this message is the source code for a library-level procedure
that will execute a shell command from within an Ada program.
------------------
with Interfaces.C;
function Execute_Shell_Command (The_Command_String : String)
      return Interfaces.C.Int is
   package C renames Interfaces.C;
   function System (S : C.Char_Array) return C.Int;
   pragma Import (C, System, "system");
begin
   return System (C.To_C (The_Command_String));
end Execute_Shell_Command;






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

* Re: DOS Command in OA
  1999-08-04  0:00 DOS Command in OA KdoMFueSys Wilhelmshaven
  1999-08-04  0:00 ` David C. Hoos, Sr.
  1999-08-04  0:00 ` Ted Dennison
@ 1999-08-04  0:00 ` Gautier
  1999-08-04  0:00   ` Ed Falis
  2 siblings, 1 reply; 11+ messages in thread
From: Gautier @ 1999-08-04  0:00 UTC (permalink / raw)


IIRC, there are EXEC & EXEC_COMMAND in a DOS package in Alsys;
maybe it's the same with OA.

-- 
Gautier

--------
http://members.xoom.com/gdemont/




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

* Re: DOS Command in OA
  1999-08-04  0:00 DOS Command in OA KdoMFueSys Wilhelmshaven
  1999-08-04  0:00 ` David C. Hoos, Sr.
@ 1999-08-04  0:00 ` Ted Dennison
  1999-08-04  0:00   ` David C. Hoos, Sr.
  1999-08-04  0:00 ` Gautier
  2 siblings, 1 reply; 11+ messages in thread
From: Ted Dennison @ 1999-08-04  0:00 UTC (permalink / raw)


In article <37A80902.1454720B@nwn.de>,
  KdoMFueSys Wilhelmshaven <mfuesys.admin@nwn.de> wrote:
> we've implemented a screen_io package in order to ease basic in- and
> output based upon ESC-Seqeunces using ANSI.SYS as it was described
> formerly in this group.

You do of course realize that this will not work in WindowsNT? (without
a lot of extra work, anyway).

> What we are trying now, is to change the screen's text-resolution from
> 80x25 to 80x50, e.g. with dos command
> mode co80 50.
> What we are trying is to invoke this call from within our ada-code.

It might be easier to just change the properties on the DOS window you
use to start your program.

--
T.E.D.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




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

* Re: DOS Command in OA
  1999-08-04  0:00 ` Gautier
@ 1999-08-04  0:00   ` Ed Falis
  1999-08-04  0:00     ` David C. Hoos, Sr.
  0 siblings, 1 reply; 11+ messages in thread
From: Ed Falis @ 1999-08-04  0:00 UTC (permalink / raw)


Take a look in the subdirectory <oa_installation>\lib\ada83 

The old Alsys DOS packages are there, ported to windows, with some restrictions.  Create a library, compile them, and link to it from your 
application library, or just compile them into the application library.  They MAY have what you're looking for.  They certainly have the 
"exec" commands that were mentioned, but NT could get in the way of whay you're trying to do.

- Ed




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

* Re: DOS Command in OA
  1999-08-04  0:00 ` Ted Dennison
@ 1999-08-04  0:00   ` David C. Hoos, Sr.
  1999-08-05  0:00     ` Ted Dennison
  0 siblings, 1 reply; 11+ messages in thread
From: David C. Hoos, Sr. @ 1999-08-04  0:00 UTC (permalink / raw)



Ted Dennison wrote in message <7o9h0a$d68$1@nnrp1.deja.com>...
>In article <37A80902.1454720B@nwn.de>,
>  KdoMFueSys Wilhelmshaven <mfuesys.admin@nwn.de> wrote:
>> we've implemented a screen_io package in order to ease basic in- and
>> output based upon ESC-Seqeunces using ANSI.SYS as it was described
>> formerly in this group.
>
>You do of course realize that this will not work in WindowsNT? (without
>a lot of extra work, anyway).

Note what the poser of the question said, viz.:

We are using WIN95 and Aonix Object Ada 7.1.


ANSI.SYS is alive and well in WIN95, and changing the console mode
from within the program works just fine.








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

* Re: DOS Command in OA
  1999-08-04  0:00   ` Ed Falis
@ 1999-08-04  0:00     ` David C. Hoos, Sr.
  0 siblings, 0 replies; 11+ messages in thread
From: David C. Hoos, Sr. @ 1999-08-04  0:00 UTC (permalink / raw)



Ed Falis wrote in message <1103_933772501@DZOG-CHEN>...
>Take a look in the subdirectory <oa_installation>\lib\ada83
>
>The old Alsys DOS packages are there, ported to windows, with some
restrictions.  Create a library, compile them, and link to it from your
>application library, or just compile them into the application library.
They MAY have what you're looking for.  They certainly have the
>"exec" commands that were mentioned, but NT could get in the way of whay
you're trying to do.
>

Note what the poser of the question said, viz.:

We are using WIN95 and Aonix Object Ada 7.1.


ANSI.SYS is alive and well in WIN95, and changing the console mode
from within the program works just fine.








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

* DOS Command in OA
@ 1999-08-04  0:00 KdoMFueSys Wilhelmshaven
  1999-08-04  0:00 ` David C. Hoos, Sr.
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: KdoMFueSys Wilhelmshaven @ 1999-08-04  0:00 UTC (permalink / raw)


Hallo,
we've implemented a screen_io package in order to ease basic in- and
output based upon ESC-Seqeunces using ANSI.SYS as it was described
formerly in this group.
What we are trying now, is to change the screen's text-resolution from
80x25 to 80x50, e.g. with dos command
mode co80 50.
What we are trying is to invoke this call from within our ada-code.

Our question is:
Is there any possible solution, to invoke DOS-Commands from within
Object-Ada-Code?
And if not, is there any possibility to change screen's text-resolution
from 80x25 to 80x25?

We are using WIN95 and Aonix Object Ada 7.1.

We appreciate any help, thanks in advance.

Carsten Schnedler
PiCasi@T-Online.de





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

* Re: DOS Command in OA
  1999-08-05  0:00     ` Ted Dennison
@ 1999-08-05  0:00       ` David C. Hoos, Sr.
  1999-08-06  0:00       ` KdoMFueSys Wilhelmshaven
  1 sibling, 0 replies; 11+ messages in thread
From: David C. Hoos, Sr. @ 1999-08-05  0:00 UTC (permalink / raw)



Ted Dennison wrote in message <7oc4do$9ml$1@nnrp1.deja.com>...
>In article <7o9kr7$nca@hobbes.crc.com>,
>  "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com> wrote:
>>
>> Note what the poser of the question said, viz.:
>>
>> We are using WIN95 and Aonix Object Ada 7.1.
>
>Just because they are developing using Win95 doesn't mean that they will
>never want it to run under NT. As someone who runs NT on his home rig,
>I'm a little sensitive to this issue. The vast majority of programs
>(even games, which tend to be highly-tuned to their environment) run
>just fine on Win95, Win98, and WinNT. That creates a certian expectation
>among Windows users that properly-written programs should run on both.
>Anyone using an option that will tie it to one of those choices only,
>should be aware of that fact, and very certian that this is ok with
>their users.
>
Well... as a matter of fact, resizing the window with a mode command
issued from within the program works on NT, as well as 95/98.

What doesn't exist (to my knowledge, at least) is an implementation of
ANSI.SYS for NT.








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

* Re: DOS Command in OA
  1999-08-04  0:00   ` David C. Hoos, Sr.
@ 1999-08-05  0:00     ` Ted Dennison
  1999-08-05  0:00       ` David C. Hoos, Sr.
  1999-08-06  0:00       ` KdoMFueSys Wilhelmshaven
  0 siblings, 2 replies; 11+ messages in thread
From: Ted Dennison @ 1999-08-05  0:00 UTC (permalink / raw)


In article <7o9kr7$nca@hobbes.crc.com>,
  "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com> wrote:
>
> Note what the poser of the question said, viz.:
>
> We are using WIN95 and Aonix Object Ada 7.1.

Just because they are developing using Win95 doesn't mean that they will
never want it to run under NT. As someone who runs NT on his home rig,
I'm a little sensitive to this issue. The vast majority of programs
(even games, which tend to be highly-tuned to their environment) run
just fine on Win95, Win98, and WinNT. That creates a certian expectation
among Windows users that properly-written programs should run on both.
Anyone using an option that will tie it to one of those choices only,
should be aware of that fact, and very certian that this is ok with
their users.

--
T.E.D.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




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

* Re: DOS Command in OA
  1999-08-04  0:00 ` David C. Hoos, Sr.
@ 1999-08-06  0:00   ` czgrr
  0 siblings, 0 replies; 11+ messages in thread
From: czgrr @ 1999-08-06  0:00 UTC (permalink / raw)


In article <KcVp3.404$9f1.41774@typ12.nn.bcandid.com>,
  "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com> wrote:
> [We are using WIN95 and Aonix Object Ada 7.1.]
> ------------------
> with Interfaces.C;
> function Execute_Shell_Command (The_Command_String : String)
>       return Interfaces.C.Int is
>    package C renames Interfaces.C;
>    function System (S : C.Char_Array) return C.Int;
>    pragma Import (C, System, "system");
> begin
>    return System (C.To_C (The_Command_String));
> end Execute_Shell_Command;

And what linker option or path do I need to add in order to get this to
build without a "LNK2001: unresolved external symbol _system" error?

Cheers,
czgrr
--
Email address blocked - reply to the newsgroup.
Assume Ada83 and (V)C++ unless said otherwise.
My opinions are independent from my employer's.
Use any suggestions at your own risk.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




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

* Re: DOS Command in OA
  1999-08-05  0:00     ` Ted Dennison
  1999-08-05  0:00       ` David C. Hoos, Sr.
@ 1999-08-06  0:00       ` KdoMFueSys Wilhelmshaven
  1 sibling, 0 replies; 11+ messages in thread
From: KdoMFueSys Wilhelmshaven @ 1999-08-06  0:00 UTC (permalink / raw)




>
>
> Just because they are developing using Win95 doesn't mean that they will
> never want it to run under NT. As someone who runs NT on his home rig,
> I'm a little sensitive to this issue. The vast majority of programs
> (even games, which tend to be highly-tuned to their environment) run
> just fine on Win95, Win98, and WinNT. That creates a certian expectation
> among Windows users that properly-written programs should run on both.
> Anyone using an option that will tie it to one of those choices only,
> should be aware of that fact, and very certian that this is ok with
> their users.

That's true, but it isn't planned to migrate from WIN95 to NT. We only were
interested in how to do it, cause we thought, that ist is a bit
uncomfortable for us, to change window's resolution by hand. The migration
isn't planned because we are programming only for teaching aspects.
We are trying to teach a good Ada - programming-style for beginners.
Therefore our focus isn't to much on how to handle migrations etc. but
teaching the various aspects of programming with Ada. We have a lot to do
with it, therefore the screen io has only been implemented to watch results
more easily.

Carsten Schnedler







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

end of thread, other threads:[~1999-08-06  0:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-04  0:00 DOS Command in OA KdoMFueSys Wilhelmshaven
1999-08-04  0:00 ` David C. Hoos, Sr.
1999-08-06  0:00   ` czgrr
1999-08-04  0:00 ` Ted Dennison
1999-08-04  0:00   ` David C. Hoos, Sr.
1999-08-05  0:00     ` Ted Dennison
1999-08-05  0:00       ` David C. Hoos, Sr.
1999-08-06  0:00       ` KdoMFueSys Wilhelmshaven
1999-08-04  0:00 ` Gautier
1999-08-04  0:00   ` Ed Falis
1999-08-04  0:00     ` David C. Hoos, Sr.

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