comp.lang.ada
 help / color / mirror / Atom feed
* Ms-dos windows
@ 2000-11-11  0:00 Marc
  2000-11-12  0:00 ` Marin David Condic
  0 siblings, 1 reply; 7+ messages in thread
From: Marc @ 2000-11-11  0:00 UTC (permalink / raw)


Hello,
I'm new in ada,
when I execute my program from ada environment,(Execute option) a dos window
appears but nothing append inside. Why???
I use Put and Get statements.
Thank for your answer
(Ada 3.12 for windows)





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

* Re: Ms-dos windows
  2000-11-11  0:00 Ms-dos windows Marc
@ 2000-11-12  0:00 ` Marin David Condic
  2000-11-12  0:00   ` Marc
  0 siblings, 1 reply; 7+ messages in thread
From: Marin David Condic @ 2000-11-12  0:00 UTC (permalink / raw)
  To: Marc

It is a little unclear about what you are trying to do. Are you using GNAT and
AdaGide? You might try to make a small "Hello World" application as an
illustration of what you want to do and see if you can get the I/O to work from
there. Something like:

with Ada.Text_IO ;
with Ada.Integer_Text_IO ;
procedure Hello_World is
    Int    : Integer ;
begin
    Ada.Text_IO.Put_Line ("Hello World!") ;
    Ada.Text_IO.Put ("Enter An Integer: ") ;
    Ada.Integer_Text_IO.Get (Int) ;
    Ada.Text_IO.Put_Line ("Your Number + 10 Is: " & Integer'Image (Int + 10)) ;
end Hello_World ;

Try that and see if it works.

MDC


Marc wrote:

> Hello,
> I'm new in ada,
> when I execute my program from ada environment,(Execute option) a dos window
> appears but nothing append inside. Why???
> I use Put and Get statements.
> Thank for your answer
> (Ada 3.12 for windows)

--
======================================================================
Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
Visit my web site at:  http://www.mcondic.com/

    "Giving money and power to Government is like giving whiskey
    and car keys to teenage boys."

        --   P. J. O'Rourke
======================================================================






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

* Re: Ms-dos windows
  2000-11-12  0:00 ` Marin David Condic
@ 2000-11-12  0:00   ` Marc
  2000-11-13  0:00     ` Marin David Condic
  2000-11-13  0:45     ` tmoran
  0 siblings, 2 replies; 7+ messages in thread
From: Marc @ 2000-11-12  0:00 UTC (permalink / raw)


Hello,
Thank you for your response.
First, I'am using GNAT  and ADAGIDE.
In the ADAGIDE window, you can see a green button????
When I push this one (Run), the same as F4  (execute)
a DOS window emulation appears.
I've made a copy from your source, but nothing is coming in this
window.
When I start first a dos window emulation and when I enter
the way to execute my program, there is no problems.
I can see the sentences in the dos window emulation.
Do you have an idea?
Thank you for your help.
Marc.


"Marin David Condic" <mcondic.nospam@acm.org> wrote in message
news:3A0EBA81.240F986F@acm.org...
> It is a little unclear about what you are trying to do. Are you using GNAT
and
> AdaGide? You might try to make a small "Hello World" application as an
> illustration of what you want to do and see if you can get the I/O to work
from
> there. Something like:
>
> with Ada.Text_IO ;
> with Ada.Integer_Text_IO ;
> procedure Hello_World is
>     Int    : Integer ;
> begin
>     Ada.Text_IO.Put_Line ("Hello World!") ;
>     Ada.Text_IO.Put ("Enter An Integer: ") ;
>     Ada.Integer_Text_IO.Get (Int) ;
>     Ada.Text_IO.Put_Line ("Your Number + 10 Is: " & Integer'Image (Int +
10)) ;
> end Hello_World ;
>
> Try that and see if it works.
>
> MDC
>
>
> Marc wrote:
>
> > Hello,
> > I'm new in ada,
> > when I execute my program from ada environment,(Execute option) a dos
window
> > appears but nothing append inside. Why???
> > I use Put and Get statements.
> > Thank for your answer
> > (Ada 3.12 for windows)
>
> --
> ======================================================================
> Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
> Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
> Visit my web site at:  http://www.mcondic.com/
>
>     "Giving money and power to Government is like giving whiskey
>     and car keys to teenage boys."
>
>         --   P. J. O'Rourke
> ======================================================================
>
>





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

* Re: Ms-dos windows
  2000-11-13  0:00       ` Marin David Condic
@ 2000-11-13  0:00         ` tmoran
  0 siblings, 0 replies; 7+ messages in thread
From: tmoran @ 2000-11-13  0:00 UTC (permalink / raw)


>> If you want to position and color text, there are three ways to do it:
>Did I miss something here? I think the guy is just trying to get a
>plain-vanilla text_io thing to work from the window that pops up from
  Sorry, the stuff about positioning and color was purely in addition
to what the post asked about.




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

* Re: Ms-dos windows
  2000-11-12  0:00   ` Marc
@ 2000-11-13  0:00     ` Marin David Condic
  2000-11-13  0:45     ` tmoran
  1 sibling, 0 replies; 7+ messages in thread
From: Marin David Condic @ 2000-11-13  0:00 UTC (permalink / raw)


O.K. When I bring the example program up in AdaGide and hit the green "run"
button, the DOS window pops up and shows:

Hello World!
Enter An Integer:

When you enter an integer, it looks like this:

Hello World!
Enter An Integer: 6
Your Number + 10 Is:  16

A little dialog window pops up to let you terminate the program.

Did you hit the "compile" and the "build" buttons first to produce an
executable? (Without the .EXE, you should have seen a different result, but its
good to doublecheck that you have gone through all the steps and produced an
executable file.)

If this is not happening, you may have a badly installed GNAT/AdaGide. You may
want to try reinstalling it. Or there may be something wrong with the OS. I'm
using Win2k, but it ought to work properly on Win95/98/NT. Unless possibly you
have some problem with the OS being corrupted in some way.

Another thing to try is to run it from a command line. Open up a command line
window and set your default to the directory in which the Hello_World.adb file
exists. Type "gnatmake hello_world" and then type "hello_world" to see it run.
If this works, but AdaGide execution does not, then possibly you just have a
problem with the AdaGide installation.

Hope this helps.

MDC


Marc wrote:

> Hello,
> Thank you for your response.
> First, I'am using GNAT  and ADAGIDE.
> In the ADAGIDE window, you can see a green button????
> When I push this one (Run), the same as F4  (execute)
> a DOS window emulation appears.
> I've made a copy from your source, but nothing is coming in this
> window.
> When I start first a dos window emulation and when I enter
> the way to execute my program, there is no problems.
> I can see the sentences in the dos window emulation.
> Do you have an idea?
> Thank you for your help.
> Marc.

--
======================================================================
Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
Visit my web site at:  http://www.mcondic.com/

    "Giving money and power to Government is like giving whiskey
    and car keys to teenage boys."

        --   P. J. O'Rourke
======================================================================






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

* Re: Ms-dos windows
  2000-11-13  0:45     ` tmoran
@ 2000-11-13  0:00       ` Marin David Condic
  2000-11-13  0:00         ` tmoran
  0 siblings, 1 reply; 7+ messages in thread
From: Marin David Condic @ 2000-11-13  0:00 UTC (permalink / raw)


Tom:

Did I miss something here? I think the guy is just trying to get a
plain-vanilla text_io thing to work from the window that pops up from
AdaGide when you run. Is it possible that he has some sort of terminal
emulation options set that is preventing the usual Ada.Text_IO stuff from
coming out? I don't think its a case of escape sequences. He says he can't
get my little "Hello_World" example to display text and I'm doubtful that
it relies on anything unusual.

MDC

tmoran@acm.org wrote:

> If you want to position and color text, there are three ways to do it:
> 1) If you are using a version of Windows that supports ANSI.SYS, you
> can send escape codes and treat the screen as an ANSI terminal.
> Look at www.adapower.com to find Mike Feldman's packages.
> 2) In a true Windows app, text is not written with Ada.Text_IO, nor
> keystrokes gotten with Get_Immediate.  It's handled quite differently
> with MS Windows API calls.  This can be substantially simplified by
> using a thick binding such as CLAW (www.rrsoftware.com - I'm one of
> the authors).  The last time I looked, though, the demo OA version
> had limits that prevented it from compiling even the small demo CLAW
> version.
> 3) If you are really emulating DOS, you can stick character and control
> codes wherever you want in screen RAM.  jvandyk (sp?) has packages
> for that.  Take a look in www.adapower.com

--
======================================================================
Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
Visit my web site at:  http://www.mcondic.com/

    "Giving money and power to Government is like giving whiskey
    and car keys to teenage boys."

        --   P. J. O'Rourke
======================================================================






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

* Re: Ms-dos windows
  2000-11-12  0:00   ` Marc
  2000-11-13  0:00     ` Marin David Condic
@ 2000-11-13  0:45     ` tmoran
  2000-11-13  0:00       ` Marin David Condic
  1 sibling, 1 reply; 7+ messages in thread
From: tmoran @ 2000-11-13  0:45 UTC (permalink / raw)


If you want to position and color text, there are three ways to do it:
1) If you are using a version of Windows that supports ANSI.SYS, you
can send escape codes and treat the screen as an ANSI terminal.
Look at www.adapower.com to find Mike Feldman's packages.
2) In a true Windows app, text is not written with Ada.Text_IO, nor
keystrokes gotten with Get_Immediate.  It's handled quite differently
with MS Windows API calls.  This can be substantially simplified by
using a thick binding such as CLAW (www.rrsoftware.com - I'm one of
the authors).  The last time I looked, though, the demo OA version
had limits that prevented it from compiling even the small demo CLAW
version.
3) If you are really emulating DOS, you can stick character and control
codes wherever you want in screen RAM.  jvandyk (sp?) has packages
for that.  Take a look in www.adapower.com



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

end of thread, other threads:[~2000-11-13  0:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-11  0:00 Ms-dos windows Marc
2000-11-12  0:00 ` Marin David Condic
2000-11-12  0:00   ` Marc
2000-11-13  0:00     ` Marin David Condic
2000-11-13  0:45     ` tmoran
2000-11-13  0:00       ` Marin David Condic
2000-11-13  0:00         ` tmoran

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