by Ludovic Brenta <ludovic@[EMAIL PROTECTED]
>
Mar 30, 2008 at 11:38 PM
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.