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,a691dc29968966aa X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-19 13:05:28 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: pragma Import with 'Address clause Date: Wed, 19 Mar 2003 15:03:57 -0600 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3719.2500 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:35526 Date: 2003-03-19T15:03:57-06:00 List-Id: Beard, Frank Randolph CIV wrote in message ... >> The Pragma Import should not be needed. >Shouldn't be needed but isn't guaranteed. The Pragma Import is >there to ensure the compiler doesn't initialize the data. There >is no guarantee that the compiler won't initialize it to >something, despite the fact the data structure doesn't have a >default expression. Absolutely right. Also recall that Ada requires implicit initialization of discriminants and access objects, so you need to insure that there is nothing that requires implicit initialization as well as default expressions. >When we were on VAX Ada, it seemed to initialize everything within >the range of the type. I'm told that Rational Apex does this (I haven't checked it myself). Conclusion: if you need your code to be portable enough to compile with another Ada compiler (including a new version of the one you are using), you'll use the pragma Import. Randy.