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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1439b64f125c2d2e X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: Normalize_Scalars Date: Thu, 08 Feb 2007 11:43:30 +0100 Message-ID: <530d71F1q04boU1@mid.individual.net> References: <1170856753.227788.36470@s48g2000cws.googlegroups.com> <1170857744.665191.14780@p10g2000cwp.googlegroups.com> <52ua0sF1q172nU2@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: individual.net 5govb9TO6PFcuSTUd5HYbw4fRFq0usaaosAnNNMR+nRdm8hdo= User-Agent: KNode/0.10.4 Xref: g2news2.google.com comp.lang.ada:9132 Date: 2007-02-08T11:43:30+01:00 List-Id: Simon Wright wrote: > "Alex R. Mosteo" writes: > >> Maciej Sobczak wrote: >> >>> gautier_niouzes@hotmail.com wrote: >>>> BTW >>>> - it seems that Normalize_Scalars is in Ada 95, Initialize_Scalars is >>>> GNAT-only. >>> >>> Portable code? :-) >>> >>> But to be frank, I'm fine with GNAT-only Initialize_Scalars. Thank you >>> for pointing me in this direction. >> >> But bear in mind they do opposite things! > > ? > > Normalize_Scalars: "This pragma ensures that an otherwise > uninitialized scalar object is set to a predictable value, but out of > range if possible.' (ARM95) > > Intialize_Scalars: "This pragma is similar to Normalize_Scalars > conceptually ..." (GNATRM) Mmmm I had the following idea about them: Normalize_Scalars should tries to cause an exception as soon as possible, because it initializes to an /invalid/ value. ITOH, Initialize_Scalars will use a /valid/ value for the initialization. So the former should expose bugs and the latter hide them, for programs that don't do proper initializations. But I've seen after your warn that Initialize_Scalars is tailored by the user, so my remembrances can come from a particular use of this pragma...