comp.lang.ada
 help / color / mirror / Atom feed
From: Jeff C <jcreem@yahoo.com>
Subject: Re: reverse Integer'image(someString);
Date: Mon, 25 Apr 2005 07:10:59 -0400
Date: 2005-04-25T07:10:59-04:00	[thread overview]
Message-ID: <KIednSCHV-GzTfHfRVn-qw@comcast.com> (raw)
In-Reply-To: <426cb55e$0$30475$ba620e4c@news.skynet.be>

Adrien Plisson wrote:
> Doker wrote:
>  > when i want String from Integer i do reverse Integer'image(someString);
> 
> isn't this wrong ? it should be:
> someString := Integer'Image( someInteger );

Actually, new people get into trouble all of the time with
that construct and end up with constraint errors.
When used in this form, someString needs to be extactly the
same length as the return length of Integer'image(someInteger).


What does work fine are:

a)

   Text_IO.Put_Line(Integer'Image(Some_Integer));

b)

   declare
     Some_String : constant String := Integer'Image(Some_Integer);
   begin
     ...play with Some_String
   end;



  reply	other threads:[~2005-04-25 11:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-23 19:59 reverse Integer'image(someString); Doker
2005-04-25  9:16 ` Adrien Plisson
2005-04-25 11:10   ` Jeff C [this message]
2005-04-25 11:40     ` David C. Hoos, Sr.
2005-04-25 11:50       ` Larry Kilgallen
2005-04-25 17:13         ` Pascal Obry
2005-04-25 17:50           ` Björn Lundin
2005-04-25 18:39             ` Pascal Obry
2005-04-25 19:43               ` Björn Lundin
2005-04-26  8:41                 ` Jean-Pierre Rosen
2005-04-26  4:12               ` Wes Groleau
2005-04-27  4:43                 ` Jeffrey Carter
2005-04-25 17:38         ` Frank J. Lhota
2005-04-25 17:14       ` Pascal Obry
2005-04-26  1:53       ` Jeffrey Carter
2005-04-28 20:31       ` Simon Wright
2005-04-25  9:18 ` Martin Krischik
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox