comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam@spam.com>
Subject: Re: Ada Pointer Size Problem
Date: Mon, 11 Oct 2004 05:18:58 GMT
Date: 2004-10-11T05:18:58+00:00	[thread overview]
Message-ID: <6Joad.8869$UP1.8086@newsread1.news.pas.earthlink.net> (raw)
In-Reply-To: <35f054ea.0410101150.25bec2f5@posting.google.com>

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




  parent reply	other threads:[~2004-10-11  5:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-10 19:50 Ada Pointer Size Problem skidmarks
2004-10-11  1:38 ` Stephen Leake
2004-10-12 18:44   ` skidmarks
2004-10-13  1:23     ` Jeffrey Carter
2004-10-13  8:07     ` Martin Krischik
2004-10-13 16:27     ` Jean-Pierre Rosen
2004-10-11  5:18 ` Jeffrey Carter [this message]
2004-10-21  1:16   ` Dave Thompson
2004-10-21  1:56     ` Jeffrey Carter
2004-10-21  9:54       ` Martin Krischik
2004-10-22  1:09         ` Jeffrey Carter
2004-10-22  7:48           ` Martin Krischik
2004-10-22  9:41             ` Adrien Plisson
2004-10-22 16:50               ` Warren W. Gay VE3WWG
2004-10-24 16:05               ` Martin Krischik
2004-10-23  1:35             ` Jeffrey Carter
2004-10-24 15:52               ` Martin Krischik
2004-10-22  5:41       ` Simon Wright
2004-10-22 18:05       ` Mark Lorenzen
2004-11-01  8:14       ` Dave Thompson
2004-10-11  8:45 ` Martin Krischik
     [not found]   ` <1c2f5137.0410130505.57e03c@posting.google.com>
2004-10-13 13:37     ` Dmitry A. Kazakov
2004-10-14  3:46     ` Steve
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox