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,61006929d3e14455 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada Pointer Size Problem References: <35f054ea.0410101150.25bec2f5@posting.google.com> In-Reply-To: <35f054ea.0410101150.25bec2f5@posting.google.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <6Joad.8869$UP1.8086@newsread1.news.pas.earthlink.net> Date: Mon, 11 Oct 2004 05:18:58 GMT NNTP-Posting-Host: 63.184.104.16 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.news.pas.earthlink.net 1097471938 63.184.104.16 (Sun, 10 Oct 2004 22:18:58 PDT) NNTP-Posting-Date: Sun, 10 Oct 2004 22:18:58 PDT Xref: g2news1.google.com comp.lang.ada:5025 Date: 2004-10-11T05:18:58+00:00 List-Id: skidmarks wrote: > 3. The string pointer size (eliding the error statements) > is 64-bits. I am using an AMD 2100 (32-bit) computer > and gcc-3.3.3-3. I would have expected a 32-bit > pointer. The first question, as always, is why you're using access types, and why you care how the compiler represents them. As an apparent beginner in Ada, you should not need access types, unless you're doing an assignment on dynamic data structures. String_Ptr isn't a pointer; it's an access type. As pointed out in another thread, access values are not necessarily pointers, and that's why they're not called pointers. In this case, the extra space is probably connected to the bounds information needed for the array. > Any idea of what I'm really missing? Probably the difference between pointers in simple languages and access values in high-level languages. In C/++, a pointer is an int is an address. In Ada, they're 3 different things. -- Jeff Carter "Don't knock masturbation. It's sex with someone I love." Annie Hall 45