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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Problem with output using Ada.Text_IO.Put Date: Sat, 19 Jul 2014 16:58:41 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <6d5e2fff-e397-4c75-a3c9-3a7825d00752@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 19 Jul 2014 23:58:43 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="ec00b5351686c67721798cbf9cd968b0"; logging-data="7953"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Fpxrg7F/Vc7PtENhCGNEo1eu2i1HBons=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: <6d5e2fff-e397-4c75-a3c9-3a7825d00752@googlegroups.com> Cancel-Lock: sha1:RVFaHUh0YgWY1LLI2gAgX/YUOIs= Xref: news.eternal-september.org comp.lang.ada:21067 Date: 2014-07-19T16:58:41-07:00 List-Id: On 07/19/2014 02:37 PM, junior learning ADA wrote: > I am starting to learn ADA and I have installed Adacore gnat 2014. Good. Is that the American Dental Association or the Americans with Disabilities Act that you're learning? Ada is a woman's name (Ada King, Countess of Lovelace, who wrote programs for Babbage's Analytical Engine), not an acronym. > BEGIN -- Coin_Collection > > -- prompt user for number of nickels and pennies > Ada.Text_IO.Put (Item => "How many nickels do you have? "); > Ada.Integer_Text_IO.Get (Item => Nickels); > Ada.Text_IO.Put (Item => "How many pennies do you have? "); > Ada.Integer_Text_IO.Get (Item => Pennies); > Ada.Text_IO.New_Line; > > > However, when I run the program the text output appears after the questions. See below: > /Users/francois/Documents/ADA/test/fk3-w95/coin_collection > 1 > 2 > How many nickels do you have? How many pennies do you have? > [2014-07-19 22:05:16] process terminated successfully, elapsed time: 16.28s That's very odd. I can't say that I've seen that behavior before. > Is the issue coming from using a newer version of ADA? No, Ada.Text_IO should work the same. -- Jeff Carter "All citizens will be required to change their underwear every half hour. Underwear will be worn on the outside, so we can check." Bananas 29