[comp.lang.ada] Access types == Addresses?

howell@COMMUNITY-CHEST.MITRE.ORG (05/04/88)

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;