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,7e81a70d49e1dad0 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Newsgroups: comp.lang.ada From: Preben Randhol Subject: Re: Adding functions to generic package References: <429891d3$1@news.broadpark.no> <4298b608$1@news.broadpark.no> <42998036$1@news.broadpark.no> <429a34bc$1@news.broadpark.no> <429a3514$1@news.broadpark.no> Organization: PVV User-Agent: slrn/0.9.8.1 (Debian) NNTP-Posting-Host: 65.80-202-208.nextgentel.com X-Original-NNTP-Posting-Host: 65.80-202-208.nextgentel.com Message-ID: <429b7b62$1@news.broadpark.no> Date: 30 May 2005 22:45:22 +0200 X-Trace: news.broadpark.no 1117485922 65.80-202-208.nextgentel.com (30 May 2005 22:45:22 +0200) Path: g2news1.google.com!news3.google.com!news.glorb.com!feeder1.news.jippii.net!news.net.hanse.com!nntp.gblx.net!nntp3.phx1!news.broadpark.no Xref: g2news1.google.com comp.lang.ada:11207 Date: 2005-05-30T22:45:22+02:00 List-Id: On 2005-05-29, Matthew Heaney wrote: > Preben Randhol writes: > >> On 2005-05-29, Preben Randhol wrote: >> > Another question. Why isn't there a Swap function in the library >> > like the one that you have in the Reverse_Container? I can make >> > something using two splices although a bit less effective I should >> > imagine? >> >> I meant not the same as it would have to be: >> >> procedure Swap (L,R : Iterator_Type); > > > OK, that makes sense. There's an operation like that (Swap_Links) in > the Ada 200Y standard container library. I can add that to Charles. I guess it must be: procedure Swap (Container : in out Container_Type; L,R : Iterator_Type); as I want the Swap to Swap say element in position 4 with element in postion 2 in the list but by using iterators to point at them. Preben