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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fed2e7871ca258cd X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-15 14:55:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!colt.net!news0.de.colt.net!news-fra1.dfn.de!news-lei1.dfn.de!news-nue1.dfn.de!news-han1.dfn.de!news.fh-hannover.de!news.cid.net!news.enyo.de!news1.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: List Container Strawman 1.4 Date: Sun, 16 Dec 2001 00:19:47 +0100 Organization: Enyo's not your organization Message-ID: <87heqs5awc.fsf@deneb.enyo.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cancel-Lock: sha1:lw9VHEuwFhn10jwc4oDjPp59rAA= Xref: archiver1.google.com comp.lang.ada:17957 Date: 2001-12-16T00:19:47+01:00 List-Id: Ted Dennison writes: > I have posted a strawman version 1.4 of the standard Ada List container at > http://www.telepath.com/dennison/Ted/Containers-Lists-Unbounded.ads.html . -- List <---> Unconstrained array conversions. type Element_Array is array (Natural range <>) of Element; function To (Source : Element_Array) return List; function From (Source : List) return Element_Array; What about a generic version of To and From which can handle arrays with different index types? -- Passive iterator. Operation will be applied on each element on the list -- Opertion can terminate this process early by setting Quit to True. generic with procedure Operation (Target : in out Element; Quit : out Boolean); procedure Passive_Iterator (Target : in out List); I'd like to suggest to make Quit mode "in out", with a default of False. -- Sorting sub-package. -- To sort in increasing order, use the ">" routine for the Reverse_Order -- parameter. To sort in decreasing order, substitute your "<" routine for -- the Reverse_Order parameter. :-) I think the Reverse_Order predicate should be named differently, so that it's clear from its name that it's a predicate. "Reverse_Order" could also mean "Reverse the order of the elments.", not just "Are these elements in reversed order?".