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,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,169e98abc3044764,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-01 12:05:19 PST Path: archiver1.google.com!news2.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!nycmny1-snf1.gtei.net!news.gtei.net!colt.net!kibo.news.demon.net!demon!skynet.be!skynet.be!freenix!proxad.net!feeder2-1.proxad.net!news3-1.free.fr!not-for-mail From: "Alex Xela" Newsgroups: comp.lang.ada Subject: Question on controlled types Date: Wed, 1 Oct 2003 21:06:38 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2727.1300 Message-ID: <3f7b24f4$0$28894$626a54ce@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 01 Oct 2003 21:03:16 MEST NNTP-Posting-Host: 81.56.190.34 X-Trace: 1065034996 news3-1.free.fr 28894 81.56.190.34:2014 X-Complaints-To: abuse@proxad.net Xref: archiver1.google.com comp.lang.ada:78 Date: 2003-10-01T21:03:16+02:00 List-Id: On the following code, what should happen during J variable elaboration? - Nothing - A call to Adjust. I tried to find the answer in RM95 but in vain. My tests on several compilers (and my feeling) were suggesting : nothing! --CODE : begin ---------------------------------------------------------------------- ------------------ with Ada.Finalization; package Instrum is type Instrum_Type is new Ada.Finalization.Controlled with record A : Integer; end record; procedure Finalize (O : in out Instrum_Type); procedure Adjust (O : in out Instrum_Type); procedure Initialize (O : in out Instrum_Type); J : Instrum.Instrum_Type := ( Ada.Finalization.Controlled with A=>0);--nothing? --J : Instrum.Instrum_Type; --raised PROGRAM_ERROR : access before elaboration end Instrum; --CODE : end ------------------------------------------------------------------------ ------------------