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 autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!mnetor!uunet!husc6!mailrus!nrl-cmf!ames!pasteur!ucbvax!COMMUNITY-CHEST.MITRE.ORG!howell From: howell@COMMUNITY-CHEST.MITRE.ORG Newsgroups: comp.lang.ada Subject: Access types == Addresses? Message-ID: <8805041333.AA02767@boardwalk.mitre.org> Date: 4 May 88 13:33:42 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet List-Id: Although some Ada compiler vendors store addresses in access types (pointers in the Bad Old Days...), it seems to be likely that some would choose to store dope vectors or pointers to dope vectors in an access type. My question is a survey of existing compilers: on how many is it true that access types == addresses? The sample pgm below may help answer the question for a specific compiler. On Verdix, access types == System.address. Please let me know what your favorite compiler does; I'll summarize to the net. Thanks, Chuck Howell The MITRE Corporation, Mail Stop Z645 7525 Colshire Drive, McLean, VA 22102 NET: howell@mitre.arpa or howell%community-chest.mitre.org@gateway.mitre.org ------------------------------------------------------------- with Text_Io; use Text_Io; with System; with Unchecked_Conversion; procedure Acctst is type Ptr is access Integer; function Addr_To_Ptr is new Unchecked_Conversion ( System.Address, Ptr); X : Ptr := new Integer'(42); begin if X = Addr_To_Ptr(X.all'address) then Put_Line ("On this compiler, access types == addresses."); else Put_Line ("On this compiler, access types DO NOT == addresses."); end if; end Acctst;