comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: Ada.Containers.Vectors Update_Element issue
Date: Wed, 14 May 2008 14:33:50 -0700 (PDT)
Date: 2008-05-14T14:33:50-07:00	[thread overview]
Message-ID: <f7f0df70-0d48-49d1-aa69-3d3f1c1e1331@s33g2000pri.googlegroups.com> (raw)
In-Reply-To: 6018a41f-e082-4f88-b882-6f1258f2cc88@s50g2000hsb.googlegroups.com

On May 14, 2:25 pm, Matthew Heaney <mhea...@on2.com> wrote:
> On May 14, 11:17 am, Adam Beneschan <a...@irvine.com> 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




  reply	other threads:[~2008-05-14 21:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-13 17:26 Ada.Containers.Vectors Update_Element issue Sébastien
2008-05-13 17:55 ` Adam Beneschan
2008-05-14 15:01   ` Sébastien
2008-05-14 15:17     ` Adam Beneschan
2008-05-14 18:21       ` Sébastien
2008-05-14 21:25       ` Matthew Heaney
2008-05-14 21:33         ` Adam Beneschan [this message]
2008-05-17  8:13     ` Ludovic Brenta
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox