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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable 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 08:59:59 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!freenix!enst.fr!not-for-mail From: "Beard, Frank Randolph CIV" Newsgroups: comp.lang.ada Subject: RE: pragma Import with 'Address clause Date: Wed, 19 Mar 2003 11:59:21 -0500 Organization: ENST, France Message-ID: Reply-To: "comp.lang.ada mail to news gateway" NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: avanie.enst.fr 1048093198 15224 137.194.161.2 (19 Mar 2003 16:59:58 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Wed, 19 Mar 2003 16:59:58 +0000 (UTC) To: "comp.lang.ada mail to news gateway" Return-Path: X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: pragma Import with 'Address clause Thread-Index: AcLuLd9MpTdVAi0kQSeRvqMfOr4qVwACIztQ X-OriginalArrivalTime: 19 Mar 2003 16:59:21.0983 (UTC) FILETIME=[E35BF8F0:01C2EE38] X-Scanned-By: MIMEDefang 2.1 (www dot roaringpenguin dot com slash mimedefang) X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.1 Precedence: list List-Id: comp.lang.ada mail to news gateway List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:35517 Date: 2003-03-19T11:59:21-05:00 > 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. When we were on VAX Ada, it seemed to initialize everything within the range of the type. The Alsys Ada, and I think the early versions of Aonix, we used initialized integers to zero, booleans to FALSE, etc. The current version of Aonix does not do the initialization. We ran into a problem once when upgrading the Aonix compiler. Code that used to work began raising CONSTRAINT_ERROR on uninitialized variables in various places. I always initialize everything, but we were working with a team that was new to Ada and weren't=20 experienced enough to value the practice. So, it is better to use the pragma to guarantee the result rather than hope it always works. Your compiler vendor may change=20 something some day and then your code will suddenly cease to run properly. Frank