From: george.priv@gmail.com
Subject: Re: Converting Type Characters to type string
Date: Sun, 30 Mar 2008 20:04:38 -0700 (PDT)
Date: 2008-03-30T20:04:38-07:00 [thread overview]
Message-ID: <8f5967a7-17ab-4eda-80fc-5cb58ae011f5@s50g2000hsb.googlegroups.com> (raw)
In-Reply-To: 32899fde-7bbb-403d-8d14-fd19b10f81ee@13g2000hsb.googlegroups.com
On Mar 30, 7:52 pm, jedivaughn <jedivaugh...@gmail.com> wrote:
> Thanks for the suggestions but I'm not quite sure how I would apply
> these to my program can you give me an example in code?
>
> Thanks for your patience
> John
procedure Test_Get is
Str : String (1 .. 10) := (others => ' ');
Index : Natural := 0;
C : Character;
begin
while index < Str'Last loop
Ada.Text_IO.Get (C);
-- This check can be different according to your needs:
exit when not Ada.Characters.Handling.Is_Digit (C);
Index := Index + 1;
Str (Index) := C;
end loop;
Ada.Text_IO.Put_Line (Str);
end Test_Get;
But I would rather use Get_Line instead of Get to get entire string
and then figure out what to do with it.
George.
next prev parent reply other threads:[~2008-03-31 3:04 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-30 20:04 Converting Type Characters to type string jedivaughn
2008-03-30 20:19 ` Pascal Obry
2008-03-30 21:08 ` jedivaughn
2008-03-30 21:28 ` jimmaureenrogers
2008-03-30 21:38 ` Ludovic Brenta
2008-03-30 21:48 ` Georg Bauhaus
2008-03-30 23:52 ` jedivaughn
2008-03-31 3:04 ` george.priv [this message]
2008-03-31 4:00 ` tmoran
2008-03-31 8:54 ` Ludovic Brenta
2008-03-31 9:59 ` Dmitry A. Kazakov
2008-03-31 10:59 ` Jean-Pierre Rosen
2008-03-31 13:50 ` jedivaughn
2008-03-31 14:11 ` Ludovic Brenta
2008-03-31 14:21 ` Dmitry A. Kazakov
2008-03-31 14:44 ` jedivaughn
2008-03-31 15:41 ` Adam Beneschan
2008-03-31 20:26 ` Maciej Sobczak
2008-03-31 22:06 ` Georg Bauhaus
2008-03-31 22:33 ` Adam Beneschan
2008-04-01 1:00 ` jedivaughn
2008-04-01 5:34 ` Simon Wright
2008-04-01 11:22 ` jedivaughn
2008-04-01 12:00 ` jimmaureenrogers
2008-04-01 13:22 ` jedivaughn
2008-04-01 17:03 ` Adam Beneschan
2008-04-01 21:11 ` Simon Wright
2008-04-01 22:22 ` jedivaughn
2008-04-03 5:54 ` tmoran
2008-04-03 14:38 ` Adam Beneschan
2008-04-01 16:58 ` Adam Beneschan
2008-03-31 15:45 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox