From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!clyde!wayback!arny From: arny@wayback.UUCP (Arny B. Engelson) Newsgroups: comp.lang.ada Subject: Re: RENAMES? Message-ID: <1190@wayback.UUCP> Date: Wed, 19-Aug-87 08:49:20 EDT Article-I.D.: wayback.1190 Posted: Wed Aug 19 08:49:20 1987 Date-Received: Sat, 22-Aug-87 06:20:29 EDT References: <94700001@hcx2> <94700003@hcx1> Organization: AT&T Bell Labs, Whippany, NJ Summary: some additional info List-Id: In article <94700003@hcx1>, brucej@hcx1.SSD.HARRIS.COM writes: > > RM 8.5(3): "The elaboration of a renaming declaration evaluates the > name that follows the reserved word _renames_ and thereby determines the > entity denoted by this name (the renamed entity)." > > The RM makes it pretty clear that the value of the renamed object > should be frozen at elaboration time, and that you should not expect > to be able to change it's value "behind the rename's back". > > So the value of `ren_var' is 1. I'd like to add one point that may not be clear to all: The value of the new object can be changed by referencing the original object. Referencing the original example: replacing: acc := new integer'(10); with: acc.all := 10; would change the value of ren_var to 10 because ren_var and acc.all denote the same entity. Arny B. Engelson {ihnp4|bonnie|clyde}!wayback!arny