From: adambeneschan@gmail.com
Subject: Re: Renaming vs assignment to constant
Date: Fri, 6 Dec 2013 17:26:48 -0800 (PST)
Date: 2013-12-06T17:26:48-08:00 [thread overview]
Message-ID: <8d3ce1a5-c349-4288-b71e-cd3875ffff04@googlegroups.com> (raw)
In-Reply-To: <b5d99976-3c25-481c-9d76-9ce642fa89c4@googlegroups.com>
On Friday, December 6, 2013 5:04:18 PM UTC-8, Shark8 wrote:
> On Friday, December 6, 2013 4:48:41 PM UTC-7, adambe...@gmail.com wrote:
>
> >
>
> > > I think the big difference happens when the result has subcomponents:
>
> > > ch : constant Character:= 'X'; -- Character X.
> > > temp : String renames Character'Image(ch); -- Its image: 'X'.
> > > ch2 : Character renames temp(2); -- The unquoted character.
>
> Size of Ch: Assuming 8.
> Size of temp: 24 + Bounds(assuming 64).
> Size of Ch2: None, it's a reference-to/alias-of Temp(2).
>
> Total 96 bits.
>
>
> > What is the big difference between that and
> > ch : constant Character:= 'X'; -- Character X.
> > temp : constant String := Character'Image(ch); -- Its image: 'X'.
> > ch2 : constant Character := temp(2); -- The unquoted character.
Ummm, no, you changed it. I kept the "renames" in the declaration of ch2; I only changed the declaration of "temp" from your earlier post. Since this thread is about the difference is declaring an object that renames a function result, and declaring a constant object that's assigned to a function result, I think discussing a rename of a subcomponent is off-topic for this thread.
-- Adam
next prev parent reply other threads:[~2013-12-07 1:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-06 15:14 Renaming vs assignment to constant Simon Wright
2013-12-06 16:09 ` Jeffrey Carter
2013-12-06 18:03 ` AdaMagica
2013-12-06 18:24 ` Jeffrey Carter
2013-12-06 16:47 ` adambeneschan
2013-12-06 18:06 ` Eryndlia Mavourneen
2013-12-07 0:47 ` Randy Brukardt
2013-12-07 1:55 ` Shark8
2013-12-06 18:35 ` G.B.
2013-12-06 20:07 ` adambeneschan
2013-12-06 21:59 ` Shark8
2013-12-06 23:48 ` adambeneschan
2013-12-07 1:04 ` Shark8
2013-12-07 1:26 ` adambeneschan [this message]
2013-12-07 6:17 ` J-P. Rosen
2013-12-07 6:22 ` J-P. Rosen
2013-12-07 8:57 ` Dmitry A. Kazakov
2013-12-07 9:02 ` 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