From: whitteng@aol.com (Whitteng)
Subject: Re: Access type conversion...
Date: 19 Jan 1995 04:21:11 -0500
Date: 1995-01-19T04:21:11-05:00 [thread overview]
Message-ID: <3flau7$bgu@newsbf02.news.aol.com> (raw)
In-Reply-To: mbejeranD2Hn5E.q5@netcom.com
Fisrt of all I have to ask, "Are you thinking like a C programmer?".
Shame, shame!
A System.Address does not have to be the same thing as an access type. On
some compilers they are not even the same size (e.g. System.Address is
4-bytes while access types are only 2-bytes). In all of the work we do we
require System.Address and access types to be the same size.
The others have shown examples of how to get the string's address. Our
standard way of getting the address of the first element of an array is
addr := array(array'first)'address;
This works and seems to be the most portable. Something like
addr := array'address,
does not have to give you the address of the array's first element, it has
to give you the address of the first storage allocation unit the array
uses. This may be a hidden data area that contains info about the array
(e.g. first, last).
There is really not much you can do with the address to the array in Ada,
but we find it quite usefull when interfacing with a library that may have
been written in assembler or C.
TTFN < ; - | )
next prev parent reply other threads:[~1995-01-19 9:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mbejeranD2Hn5E.q5@netcom.com>
1995-01-18 18:51 ` Access type conversion R. William Beckwith
1995-01-19 9:21 ` Whitteng [this message]
1995-01-20 8:59 ` Keith Thompson
1995-01-20 0:12 ` Garlington KE
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox