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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b860b4e8d00468ef X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!wn14feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Ada access vs C/C++ pointers and references From: Jim Rogers References: Organization: Your Company Message-ID: User-Agent: Xnews/5.04.25 Date: Thu, 19 Aug 2004 00:29:07 GMT NNTP-Posting-Host: 12.73.180.194 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1092875347 12.73.180.194 (Thu, 19 Aug 2004 00:29:07 GMT) NNTP-Posting-Date: Thu, 19 Aug 2004 00:29:07 GMT Xref: g2news1.google.com comp.lang.ada:2825 Date: 2004-08-19T00:29:07+00:00 List-Id: duggar@mit.edu (Keith H Duggar) wrote in news:b47de02.0408181427.25d82fe1 @posting.google.com: > I'm simply asking four things. > > First, is it correct to say that Ada access types ore more > similar to C++ references (T&) than they are to C/C++ > pointers (T*) ? Not really. C++ references are always implemented as const pointers. Ada access types are assignable, just like C/C++ pointers. > > Second, does Ada provide any facilities for direct and raw > memory access by memory address and pointer arithmetic? Yes, but not directly through access types. The package System.Storage_Elements provides the ability to perform integer arithmetic on addresses. Note that the package contains functions for converting between addresses and Integer_Address. This allows Ada to work correctly on systems without linear addressing schemes, such as the old