comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: basic ada question
Date: Fri, 19 Aug 2005 21:22:40 +0100
Date: 2005-08-19T21:22:40+01:00	[thread overview]
Message-ID: <m2ek8phe27.fsf@grendel.local> (raw)
In-Reply-To: slrndgc78g.igi.adi@ppc201.mipool.uni-jena.de

Adrian Knoth <adi@thur.de> writes:

>> It seems to be optional and not required.
>
> You're not forced to use named parameters. It's just a feature to
> ease your life ;)

And it can really make it easier to understand a call and be sure you
have the parameters right;

      System.Pool_Size.Deallocate
        (Pool => System.Pool_Size.Stack_Bounded_Pool (Pool),
         Address => Address,
         Storage_Size => Storage_Size,
         Alignment => Alignment);

might look like overkill, but you can be sure it's what was meant.

I sometimes find myself using a mixed style,

               Invalidate (Current_Item (Using),
                           If_For_Instance =>
                             Instance_Base_P (For_The_Instance));

which is more of an annotation. Of course you need to name the
parameters so that they make sense when used like this (in particluar,
name them from the point of view of the caller).



  reply	other threads:[~2005-08-19 20:22 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-19 16:35 basic ada question Randy
2005-08-19 17:55 ` Adrian Knoth
2005-08-19 20:22   ` Simon Wright [this message]
2005-08-19 21:13     ` Adrian Knoth
2005-08-22 13:28     ` Marc A. Criley
2005-08-19 21:43   ` Randy
2005-08-19 22:03     ` Adrian Knoth
2005-08-20  3:30   ` Jeffrey R. Carter
2005-08-20 14:28     ` Robert A Duff
2005-08-21 17:37     ` Steve
2005-08-21 21:45       ` Randy
2005-08-22 13:41         ` Steve
2005-08-23  1:47           ` Steve
2005-08-23 17:24             ` Martin Krischik
2005-08-23 21:32               ` Adrian Knoth
2005-08-24 16:41                 ` Martin Krischik
2005-08-20  6:36   ` [OT] Randy
2005-08-20 12:58     ` [OT] Larry Kilgallen
2005-08-20 19:48       ` [OT] Randy
2005-08-20 20:25         ` [OT] Adrian Knoth
2005-08-20 21:55           ` [OT] Way out in Left field Randy
2005-08-20 22:44           ` [OT] Randy
2005-08-20 21:27     ` [OT] TEST Randy
2005-08-20 22:52       ` Frank J. Lhota
2005-08-20 23:00         ` Randy
2005-08-20 22:31 ` [ot] test Randy
2005-08-20 22:39 ` Randy
replies disabled

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