comp.lang.ada
 help / color / mirror / Atom feed
* Re: �Help on the ADA-compiler for win95 please
       [not found] <01bcc8c5$3a7fd560$3597f482@dirk-gently>
  1997-09-24  0:00 ` Help on the ADA-compiler for win95 please Martijn Blommers
  1997-09-24  0:00 ` Help on the Ada-compiler " John Herro
@ 1997-09-24  0:00 ` Do-While Jones
  1997-09-24  0:00   ` Peter Hermann
  1997-09-25  0:00 ` ¨Help " Roy Grimm
  3 siblings, 1 reply; 5+ messages in thread
From: Do-While Jones @ 1997-09-24  0:00 UTC (permalink / raw)



In article <01bcc8c5$3a7fd560$3597f482@dirk-gently>,
KRISTIAN HOLM <kristian.holm@swipnet.se> wrote:
>When I run a ada program(already compiled and linked and so on)a dosprompt
>appears
>and shows the program thats ok so far. But if I have a prg that should for
>example add two numbers and nothing more, then I can input the two numbers
>but then the dosprompt just closes really fast. Its the same with all prg,
>when it comes to the last thing the prg is supposed to do, the dosprompt
>closes so fast that I dont know if it is alright or there is a problem of
>any kind. Happy for help!
>                

I assume you are doing something like this:

  -- compute ANSWER then
  Put_Line(integer'IMAGE(ANSWER));
end Your_Program;

The "problem" is simply that the program is over.  To make your answer
appear on the screen long enough to read it, simply add a delay statement
to the end of the program.  For example,

  -- compute ANSWER then
  Put_Line(integer'IMAGE(ANSWER));
  delay 5.0; -- show the answer for 5 seconds
end Your_Program;  -- close the DOS window

If you want the answer to remain on the screen until the user acknowledges
it, then you can do something like this:

  Put_Line(integer'IMAGE(ANSWER));
  Put_Line("Press the RETURN key to quit.");
  Get_Line(DUMMY_STRING, DUMMY_LENGTH);  -- wait for user to press RETURN
end Your_Program;

Do-While Jones

            +--------------------------------+
            |    Know                 Ada    |
            |        [Ada's Portrait]        |
            |    Will              Travel    |
            | wire do_while@ridgecrest.ca.us |
            +--------------------------------+






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

* Re: Help on the Ada-compiler for win95 please
       [not found] <01bcc8c5$3a7fd560$3597f482@dirk-gently>
  1997-09-24  0:00 ` Help on the ADA-compiler for win95 please Martijn Blommers
@ 1997-09-24  0:00 ` John Herro
  1997-09-24  0:00 ` �Help on the ADA-compiler " Do-While Jones
  1997-09-25  0:00 ` ¨Help " Roy Grimm
  3 siblings, 0 replies; 5+ messages in thread
From: John Herro @ 1997-09-24  0:00 UTC (permalink / raw)



When "KRISTIAN HOLM" <kristian.holm@swipnet.se>
runs a compiled Ada program in a DOS window under
Win 95, the window closes too fast for the results to
be seen.

Martijn Blommers <blommers@ats.nld.alcatel.nl>
suggests having the program require a keystroke at
the end.

Another thing to try is this:  Right click the title bar of the DOS window
while your program is running.  Click Properties, and uncheck the box
"Close on exit."  Click Apply and then OK.  I hope this helps.

- John Herro
Software Innovations Technology
http://members.aol.com/AdaTutor
ftp://members.aol.com/AdaTutor




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

* Re: �Help on the ADA-compiler for win95 please
  1997-09-24  0:00 ` �Help on the ADA-compiler " Do-While Jones
@ 1997-09-24  0:00   ` Peter Hermann
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Hermann @ 1997-09-24  0:00 UTC (permalink / raw)



Do-While Jones (do_while@ridgecrest.ca.us) wrote:
> The "problem" is simply that the program is over.  To make your answer
> appear on the screen long enough to read it, simply add a delay statement

additional information:
gnat3.10p1 on win95nt coming along with AdaGIDE is waiting comfortably,
i.e. there is no more need to add extra code. Nice solution.

--
Peter Hermann  Tel:+49-711-685-3611 Fax:3758 ph@csv.ica.uni-stuttgart.de
Pfaffenwaldring 27, 70569 Stuttgart Uni Computeranwendungen
Team Ada: "C'mon people let the world begin" (Paul McCartney)




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

* Re: Help on the ADA-compiler for win95 please
       [not found] <01bcc8c5$3a7fd560$3597f482@dirk-gently>
@ 1997-09-24  0:00 ` Martijn Blommers
  1997-09-24  0:00 ` Help on the Ada-compiler " John Herro
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Martijn Blommers @ 1997-09-24  0:00 UTC (permalink / raw)



Hi there Kristian!

> when it comes to the last thing the prg is supposed to do, the
> dosprompt closes so fast that I dont know if it is alright or there is > a problem of any kind. Happy for help!

Maybe I'm thinking a bit too simple, but how about waiting for 
a keystroke after your program has displayed something on the screen ?

If the program just runs it will terminate just as soon as it's 
done closing the dos-prompt on it's way out... 


GreetZ!, 

			Martijn

-- 
*              Visit : HTTP://fear.thrijswijk.nl 
*
*My views do not necessarily reflect those of my employer. 
*                       (Like they care)




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

* Re: ¨Help on the ADA-compiler for win95 please
       [not found] <01bcc8c5$3a7fd560$3597f482@dirk-gently>
                   ` (2 preceding siblings ...)
  1997-09-24  0:00 ` �Help on the ADA-compiler " Do-While Jones
@ 1997-09-25  0:00 ` Roy Grimm
  3 siblings, 0 replies; 5+ messages in thread
From: Roy Grimm @ 1997-09-25  0:00 UTC (permalink / raw)
  To: KRISTIAN HOLM


KRISTIAN HOLM wrote:
> 
> When I run a ada program(already compiled and linked and so on)a dosprompt
> appears
> and shows the program thats ok so far. But if I have a prg that should for
> example add two numbers and nothing more, then I can input the two numbers
> but then the dosprompt just closes really fast. Its the same with all prg,
> when it comes to the last thing the prg is supposed to do, the dosprompt
> closes so fast that I dont know if it is alright or there is a problem of
> any kind. Happy for help!
> 

You can set up the properties of the executable to prevent the DOS
window from closing automatically when the program is done.  I don't
have a Win95 machine in easy reach so I can't tell you exactly where the
setting is.  However, I believe that if you right click on the program
icon and select the properties menu item, you can look around to find a
check box for something like "close window on exit".  Just set it so the
window doesn't close when the program stops.  That way, you can look at
the end results and close the window when you want to.

The benefit here is that you can do this with _any_ DOS executable
running under Win95/NT.

-- 
Roy A. Grimm
Rockwell Collins Avionics, Cedar Rapids, Iowa
Voicing my own opinion, not speaking as a company representative.
All unsolicited email is quietly forwarded to /dev/null.

"History teaches us that those who beat their swords into plowshares
usually end up plowing for those who kept their swords."
--Anon.




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

end of thread, other threads:[~1997-09-25  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <01bcc8c5$3a7fd560$3597f482@dirk-gently>
1997-09-24  0:00 ` Help on the ADA-compiler for win95 please Martijn Blommers
1997-09-24  0:00 ` Help on the Ada-compiler " John Herro
1997-09-24  0:00 ` �Help on the ADA-compiler " Do-While Jones
1997-09-24  0:00   ` Peter Hermann
1997-09-25  0:00 ` ¨Help " Roy Grimm

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