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,5bbcbfbb228d6549 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!s33g2000pri.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Ada.Containers.Vectors Update_Element issue Date: Wed, 14 May 2008 14:33:50 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <4bb8bb12-225b-4790-bd12-40ef0b0adeaf@s33g2000pri.googlegroups.com> <482AFEAC.3040306@gmail.com> <8d5f96c4-9a65-4e99-bc1b-a281a547e213@l28g2000prd.googlegroups.com> <6018a41f-e082-4f88-b882-6f1258f2cc88@s50g2000hsb.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1210800830 10269 127.0.0.1 (14 May 2008 21:33:50 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 14 May 2008 21:33:50 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s33g2000pri.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:65 Date: 2008-05-14T14:33:50-07:00 List-Id: On May 14, 2:25 pm, Matthew Heaney wrote: > On May 14, 11:17 am, Adam Beneschan wrote: > > > > > The declaration of Process is "not null access procedure". This is an > > *anonymous* access because the access type isn't given a name. In Ada > > 95, you would have to make this a named access type: > > No, that's not how you would do it in Ada95. In Ada95, you would use > a generic operation: > > generic > with procedure Process (E : in out ET); > procedure Generic_Update (V : in out VT; I : IT); > > For reasons I don't understand, many developers convert Ada05 > anonymous access subprogram parameters to named access types when back- > porting to Ada95, which is completely wrong, because then you wouldn't > be able to nest the declaration of the process subprogram. Well, you're right, but in my defense I wasn't trying to teach the OP how to write an Ada.Containers.Vectors package in Ada 95---I was just trying to explain what "anonymous access-subprogram types" are in Ada 2005. -- Adam