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=2.6 required=5.0 tests=BAYES_20,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site petsd.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!mtuxo!mtunh!mtung!mtunf!ariel!vax135!petsd!joe From: joe@petsd.UUCP (Joe Orost) Newsgroups: net.lang.ada Subject: Re: Ambiguous use of dereference in Ada Message-ID: <598@petsd.UUCP> Date: Wed, 24-Jul-85 10:41:11 EDT Article-I.D.: petsd.598 Posted: Wed Jul 24 10:41:11 1985 Date-Received: Thu, 25-Jul-85 06:45:12 EDT References: <38000019@gypsy.UUCP> Reply-To: joe@petsd.UUCP (Joseph M. Orost) Organization: Perkin-Elmer DSG, Tinton Falls, N.J. Summary: "appropriate for the type" List-Id: In article <38000019@gypsy.UUCP> rosen@gypsy.UUCP writes: > ... > type stupid is > record > a: integer; > b: float; > end record; > type stupid_ptr is access stupid; > c1, c2: integer; > xxx: stupid_ptr; > begin > c1 := xxx.a; --1-- > c2 := xxx.all.a; --2-- > ... Some quotes from the bible: 4.1.3(6) (b) A component of a record: (7) The selector must be a simple name denoting a component of a record object or value. The prefix must be APPROPRIATE FOR THE TYPE of this object or value. (11) (d) An object designated by an access value: (12) The selector must be the reserved word ALL. The value of the prefix must belong to an access type. 4.1(6) A prefix is said to be APPROPRIATE FOR A TYPE in either of the following cases: (7) o The type of the prefix is the type considered. (8) o The type of the prefix is an access type whose designated type is the type considered. In your example, the first dereference is legal because of 4.1.3(7) & 4.1(8). The second dereference is legal because of 4.1.3(12) & 4.1.3(7) & 4.1(7). QED. regards, joe -- ........ ......... Full-Name: Joseph M. Orost . . . UUCP: ihnp4!vax135!petsd!joe . ...... ... ........ ARPA: vax135!petsd!joe@BERKELEY . . Phone: (201) 758-7284 . ......... Location: 40 19'49" N / 74 04'37" W US Mail: MS 313; Perkin-Elmer; 106 Apple St Tinton Falls, NJ 07724