comp.lang.ada
 help / color / mirror / Atom feed
From: joes@hcx2.SSD.HARRIS.COM
Subject: RENAMES?
Date: Mon, 17-Aug-87 11:26:00 EDT	[thread overview]
Date: Mon Aug 17 11:26:00 1987
Message-ID: <94700001@hcx2> (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;

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

             reply	other threads:[~1987-08-17 15:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1987-08-17 15:26 joes [this message]
1987-08-17 20:02 ` RENAMES? brucej
1987-08-19 12:49   ` RENAMES? Arny B. Engelson
1987-08-19 22:47 ` RENAMES? Scott Killian
replies disabled

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