comp.lang.ada
 help / color / mirror / Atom feed
* RENAMES?
@ 1987-08-17 15:26 joes
  1987-08-17 20:02 ` RENAMES? brucej
  1987-08-19 22:47 ` RENAMES? Scott Killian
  0 siblings, 2 replies; 4+ messages in thread
From: joes @ 1987-08-17 15:26 UTC (permalink / raw)





Are renames tied to the value of the renamed variable at the time that
they are elaborated, or do they always maintain the value of the renamed
variable?

I have an example program and I can't decide what it is supposed to
do. Can anyone help?

Thanks.

				Joe Schwartz
				Harris Corp.

				joes@HARRIS.COM

------------------------------------ cut here ----------------------------------

procedure rename is

 type ptr_type is access integer;
 acc : ptr_type := new integer'(1);
 ren_var : integer renames acc.all;     -- ren_var now equals 1

begin
       acc := new integer'(10);         -- change its value behind it's back

-- WHAT IS ren_var's VALUE AT THIS POINT? 1 or 10?

end rename;

------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1987-08-19 22:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1987-08-17 15:26 RENAMES? joes
1987-08-17 20:02 ` RENAMES? brucej
1987-08-19 12:49   ` RENAMES? Arny B. Engelson
1987-08-19 22:47 ` RENAMES? Scott Killian

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