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,c8360a2ce0e343cc X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!t-online.de!news-lei1.dfn.de!news-ham1.dfn.de!news.uni-hamburg.de!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: address/access/pointer confusion Date: Wed, 20 Oct 2004 23:37:41 +0000 (UTC) Organization: GMUGHDU Message-ID: References: <1c2f5137.0410200556.70a1518c@posting.google.com> <35f054ea.0410201051.78cc61a0@posting.google.com> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1098315461 18287 134.91.1.34 (20 Oct 2004 23:37:41 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Wed, 20 Oct 2004 23:37:41 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: g2news1.google.com comp.lang.ada:5551 Date: 2004-10-20T23:37:41+00:00 List-Id: skidmarks wrote: : p1 : System.Address := a(0)'Address; not necessarily, I think. And you also need to declare that a's components may be aliased, using the same keyword "aliased" as you did for a, for the Integers in a. When you compare C pointers to Ada arrays, the set of attributes and array operations is largly missing in C. (They are available in Ada, even for identifiers indirectly denoting an array, as you have indicated.) a'range for example. : -- p /= p1 in general : -- One representation of 'a' could be: : -- a => <> --> a(0) : -- p => points to the 'a' dope vector (above) AFAIK, dope info cannot always be assumed to be near addressing cells. I think the GNAT docs, for example, speak about this in the section on string access, using either fat or thin pointers. -- Georg