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,75f02dbbddbbdc88 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.189.233 with SMTP id gl9mr3677450pbc.8.1323917703724; Wed, 14 Dec 2011 18:55:03 -0800 (PST) Path: lh20ni23698pbb.0!nntp.google.com!news2.google.com!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: "Alex Mentis" Newsgroups: comp.lang.ada Subject: Re: Pop function Date: Thu, 15 Dec 2011 02:55:03 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <27517259.83.1323907586856.JavaMail.geo-discussion-forums@yqgn9> <30092575.120.1323912907099.JavaMail.geo-discussion-forums@yqja5> Mime-Version: 1.0 Injection-Date: Thu, 15 Dec 2011 02:55:03 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="gfgFYuCPiLXMU3e9SKyWUQ"; logging-data="20057"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6bYSje4+sq6CjARGqKW7bOOYfH//U3TU=" User-Agent: XanaNews/1.19.1.320 Cancel-Lock: sha1:h9S1sZqSy3FlHWdbiz1isiWNUJo= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Date: 2011-12-15T02:55:03+00:00 List-Id: Rego, P. wrote: > > Your public interface should never use access types. > > Anonymous types are a bad idea. > Why so does the language allow it? Currently I could not think a > better way of running over a pointer list: Instead of type T_List is record Next : access T_List; Item : Integer; end record; T_List_Ptr is access T_List; you should use an incomplete declaration (ARM 3.10.1): type T_List; -- incomplete declaration type T_List_Ptr is access T_List; type T_List is record Next : T_List_Ptr; Item : Integer; end record; -Alex