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=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a644fa9cd1a3869a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-19 09:40:19 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!ihug.co.nz!out.nntp.be!propagator-SanJose!in.nntp.be!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <9sn4qm$13g29j$2@ID-25716.news.dfncis.de> <3BF140D9.611DE43@brighton.ac.uk> <9srvmk$1la$1@news.huji.ac.il> <3BF2699A.731DC436@brighton.ac.uk> <9su77k$c83$1@news.huji.ac.il> <3BF3F4E9.7E32361B@brighton.ac.uk> Subject: Re: List container: Insert and Delete Message-ID: <%tbK7.30443$xS6.49650@www.newsranger.com> X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Mon, 19 Nov 2001 12:40:11 EST Organization: http://www.newsranger.com Date: Mon, 19 Nov 2001 17:40:11 GMT Xref: archiver1.google.com comp.lang.ada:16694 Date: 2001-11-19T17:40:11+00:00 List-Id: In article <3BF3F4E9.7E32361B@brighton.ac.uk>, John English says... >Missing from Ted's Strawman: Clear(L) = delete everything in the list, I think that's far more important in your version than it is in the Strawman because you use a limited type. With a limited type, the only way for someone to reuse a list variable on a new list is to delete everything out of the old one. With a non-limited list, you can just build your new list and assign it in. It could still be added, of course. It just isn't vital like it was for yours. >Cut(A,B) = remove everything between iterators A and B and return as >a list (or raise List_Error if A and B refer to separate lists), and >Copy(A,B) = copy a sublist. The use of Cut and Copy together with "&" >and Insert(Iterator,List) would deal with all the sublist operations >and operations on pairs of lists. What do you have to do a lot that requires this? They can both be built with the provided iterators without loosing much processing power. >Problems encountered: students don't like Delete(Pred(Last(L))), >they always write Delete(Last(L)) and then get a List_Error. I'd think the "Pop" operations would be the more standard (and popular) way of removing items off of one of the ends of the list than going though the effort of using the active iterator routines. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced.