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-Thread: 103376,5c89acd494ea9116 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!fdn.fr!news.wanadoo.fr!news.wanadoo.fr!not-for-mail Message-ID: <46D84B54.2060409@obry.net> Date: Fri, 31 Aug 2007 19:09:40 +0200 From: Pascal Obry Organization: Home - http://www.obry.net User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 Newsgroups: comp.lang.ada To: amado.alves@gmail.com Subject: Re: Self pointer in limited record References: <1183577468.034566.57830@n60g2000hse.googlegroups.com> <1188578849.187422.280620@50g2000hsm.googlegroups.com> In-Reply-To: <1188578849.187422.280620@50g2000hsm.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit NNTP-Posting-Date: 31 Aug 2007 19:09:49 CEST NNTP-Posting-Host: 86.205.33.214 X-Trace: 1188580189 news.orange.fr 5110 86.205.33.214:3360 X-Complaints-To: abuse@orange.fr Xref: g2news2.google.com comp.lang.ada:1629 Date: 2007-08-31T19:09:49+02:00 List-Id: amado.alves@gmail.com a �crit : > On 4 Jul, 20:31, Maciej Sobczak wrote: >> Consider: >> >> type T_Access is access all T; >> type T is new Ada.Finalization.Limited_Controlled with record >> Self: T_Access := T'Unchecked_Access; >> -- more components >> -- ... >> end record; >> >> I have seen this pattern repeatedly. > > Then you have seen illegal Ada code repeatedly. I wish this were > possible myself. Or more simply: No this is possible. It is called auto-pointer if I remember correctly and quite useful. See the corresponding thread. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net --| "The best way to travel is by means of imagination" --| --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595