From: do_while@ridgecrest.ca.us (Do-While Jones)
Subject: Re: �Help on the ADA-compiler for win95 please
Date: 1997/09/24
Date: 1997-09-24T00:00:00+00:00 [thread overview]
Message-ID: <60b5u5$f0i$1@owens.ridgecrest.ca.us> (raw)
In-Reply-To: 01bcc8c5$3a7fd560$3597f482@dirk-gently
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 |
+--------------------------------+
next prev parent reply other threads:[~1997-09-24 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 ` Do-While Jones [this message]
1997-09-24 0:00 ` �Help " Peter Hermann
1997-09-24 0:00 ` Help on the Ada-compiler " John Herro
1997-09-25 0:00 ` ¨Help on the ADA-compiler " Roy Grimm
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox