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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,18a1da27baade824 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-16 17:18:34 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc1.sfba.home.com.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: A copy question.... References: <2d87db3f.0110160209.4c6f55c2@posting.google.com> X-Newsreader: Tom's custom newsreader Message-ID: Date: Wed, 17 Oct 2001 00:18:33 GMT NNTP-Posting-Host: 24.7.82.199 X-Complaints-To: abuse@home.net X-Trace: news1.rdc1.sfba.home.com 1003277913 24.7.82.199 (Tue, 16 Oct 2001 17:18:33 PDT) NNTP-Posting-Date: Tue, 16 Oct 2001 17:18:33 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:14765 Date: 2001-10-17T00:18:33+00:00 List-Id: > 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.