From: tmoran@acm.org
Subject: Re: A copy question....
Date: Wed, 17 Oct 2001 00:18:33 GMT
Date: 2001-10-17T00:18:33+00:00 [thread overview]
Message-ID: <t74z7.24114$gT6.15011939@news1.rdc1.sfba.home.com> (raw)
In-Reply-To: 2d87db3f.0110160209.4c6f55c2@posting.google.com
> The use of
> > for Source'Address use Address;
> is not portable.
>
> Rational would initialise Source to 0's (unless the Pragma Import is used).
It's not a portability problem, it's an error in the code I posted. :(
Most compilers of my acquaintance only initialize things with
initializers, and don't initialize simple arrays of integers. But that
just demonstrates the disadvantages of not using a diversity of compilers.
Yes indeed there should be a Pragma Import.
As I read the LRM, the array Source ought to be declared aliased, also.
Speaking of portability,
> function To_Pointer_To_The_Array is
> new Ada.Unchecked_Conversion (System.Address, Pointer_To_The_Array);
is not portable, while
package System.Address_To_Access_Conversions
is specifically designed to do what you want.
> Put_Line (Copied_Array (N)'Img);
The 'Img attribute is a "vendor special", 'Image would be portable.
next prev parent reply other threads:[~2001-10-17 0:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-15 10:40 A copy question Zebylon
2001-10-15 11:21 ` Dale Stanbrough
2001-10-15 11:30 ` Dale Stanbrough
2001-10-15 11:59 ` Petter Fryklund
2001-10-15 21:04 ` Dale Stanbrough
2001-10-16 2:34 ` Jeffrey Carter
2001-10-16 11:15 ` Dale Stanbrough
2001-10-15 13:38 ` Ted Dennison
2001-10-15 13:30 ` Mark Doherty
2001-10-15 17:00 ` tmoran
2001-10-16 10:09 ` Mark Doherty
2001-10-17 0:18 ` tmoran [this message]
2001-10-17 1:14 ` David Botton
2001-10-16 23:00 ` David Botton
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox