From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, SUBJECT_NEEDS_ENCODING,SUBJ_ILLEGAL_CHARS autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d6bf99f94cb0bcf8 X-Google-Attributes: gid103376,public X-Google-Thread: 103cc1,d6bf99f94cb0bcf8 X-Google-Attributes: gid103cc1,public X-Google-Thread: 108717,d6bf99f94cb0bcf8 X-Google-Attributes: gid108717,public From: do_while@ridgecrest.ca.us (Do-While Jones) Subject: Re: �Help on the ADA-compiler for win95 please Date: 1997/09/24 Message-ID: <60b5u5$f0i$1@owens.ridgecrest.ca.us>#1/1 X-Deja-AN: 275181720 References: <01bcc8c5$3a7fd560$3597f482@dirk-gently> Organization: RidgeNet - SLIP/PPP Internet, Ridgecrest, CA. (760) 371-3501 Newsgroups: comp.compilers.tools,comp.lang.ada,comp.programming Date: 1997-09-24T00:00:00+00:00 List-Id: In article <01bcc8c5$3a7fd560$3597f482@dirk-gently>, 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! > 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 | +--------------------------------+