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.212.232 with SMTP id nn8mr4883969pbc.1.1323952991779; Thu, 15 Dec 2011 04:43:11 -0800 (PST) Path: lh20ni25256pbb.0!nntp.google.com!news1.google.com!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Pop function Date: Thu, 15 Dec 2011 12:43:11 +0000 Organization: A noiseless patient Spider Message-ID: References: <27517259.83.1323907586856.JavaMail.geo-discussion-forums@yqgn9> <31100824.174.1323919653265.JavaMail.geo-discussion-forums@yqcs5> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="9793"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/msgGgKAnT5jzjGWA3Ww+AhjpzUnSfciI=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (darwin) Cancel-Lock: sha1:etlVEI/8Xa4QrKseyi53Sl65mRY= sha1:UFxbil5MUyZddpuiKgZOKk0cBg8= Content-Type: text/plain; charset=us-ascii Date: 2011-12-15T12:43:11+00:00 List-Id: "Rego, P." writes: > Ok. So it would be like > > procedure Pop (Sender : in out T_List_Ptr; > T_Item : out Integer) is > Previous_Sender : T_List_Ptr; [...] > but in this case I could not call > Some_Obj : access T_List; > Other_Int : Integer; > ... > Other_Int := Some_Obj.Pop; > because Pop is not a primitive of T_List. The notation Some_Obj.Pop > would be just sintatic sugar, but would exist a way we can implement > Pop for using with this? (but sure...that's also ok for the non-sugar > case) I don't see why Pop takes T_List_Ptr as an argument. I would have written procedure Pop (Sender : in out T_List; T_Item : out Integer) is and then it would be primitive (assuming T_List is tagged). And why is the parameter called Sender? that sounds like a name in the domain of the problem you're trying to solve, rather than in the domain of popping an item from a List. Maybe From would be better. And how come a List has an operation Pop? sounds more like a Stack or a Queue.