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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,37c1f61bd0b7914 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!eweka.nl!lightspeed.eweka.nl!feeder1.cambrium.nl!feed.tweaknews.nl!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Converting Type Characters to type string References: <45128c93-6001-47bd-9feb-d82ac04a5515@k13g2000hse.googlegroups.com> <47EFF5DF.401@obry.net> Date: Sun, 30 Mar 2008 23:38:31 +0200 Message-ID: <873aq799k8.fsf@ludovic-brenta.org> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:3n76Ji9MPqt7ngGDMzLrYWYvzuQ= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Tele2 X-Trace: DXC=1m1CeIgiVRDHKIOHYdA:0A6`Y6aWje^YJnS[NEF@hYXDJ^hai9M\[kDKT^dZHTN8SJ5;AHc98[3[B Xref: g2news1.google.com comp.lang.ada:20656 Date: 2008-03-30T23:38:31+02:00 List-Id: jedivaughn writes: > number 1 thank you so much for the fast response. But when I try your > suggestion and use say "1234" for the input I get the number 1, a few > spaces, and then some smiley faces. not exactly what I was hoping > for :) . Here's my code if that's any help. > > with ada.text_IO, ada.integer_text_IO; > > procedure integers is > > index : natural :=0; > char : character; > str : string (1..10); > > begin > > ada.text_IO.put("Please enter a few Integers "); > ada.text_IO.get(char); > > Index := Index + 1; > Str(Index) := Char; > ada.text_IO.put(str); ^^^ Of course. Pascal said that "Str (1 .. Index)" contains the user input as a string, not "Str" which contains exactly 10 characters no matter how many the user typed. > end integers; > > Once again thanks so much for your help > - John -- Ludovic Brenta.