comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: not null access procedure
Date: Wed, 2 Nov 2005 09:10:42 +0100
Date: 2005-11-02T09:08:49+01:00	[thread overview]
Message-ID: <eldebibca87h$.whss1x5uo9f1$.dlg@40tude.net> (raw)
In-Reply-To: wcchdavluvw.fsf@shell01.TheWorld.com

On 01 Nov 2005 20:07:47 -0500, Robert A Duff wrote:

> Anonymous Coward <bogus_addy@bogus_domain.net> writes:
> 
>> I noticed some syntax in the package specification of that link above,
>> which is unfamiliar to me:
>> 
>>    procedure Update_Element
>>      (Container : in out Vector;
>>       Index     : in     Index_Type;
>>       Process   : not null access procedure (Element : in out Element_Type));
>> 
>> What is meant by this "not null"?  Is this available in ADA95, or new
>> to ADA05?
> 
> New to Ada 2005.  "Not null" means there's a run-time check that the
> pointer is not null.  It's pretty annoying that in order to pass a
> procedure as a parameter, you have to say the noise words "not null access",
> but that was considered necessary for compatibility.

Were subroutine types considered?

procedure Update_Element
     (Container : in out Vector;
       Index     : in Index_Type;
      Process   : in procedure (Element : in out Element_Type));

type Call_Back is procedure (...);

etc

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2005-11-02  8:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-22 15:16 Dynamic String TC
2005-10-22 17:10 ` jimmaureenrogers
2005-10-22 21:03 ` Jeffrey R. Carter
2005-10-22 21:51 ` Adrian Knoth
2005-10-26 14:04 ` Martin Krischik
2005-10-31 10:15 ` Harald Korneliussen
2005-10-31 12:05   ` Larry Kilgallen
2005-11-01  8:02     ` Harald Korneliussen
2005-11-01 10:55       ` Pascal Obry
2005-11-01 17:20       ` Martin Dowie
2005-11-01 20:09       ` Matthew Heaney
2005-11-02  0:34         ` not null access procedure (was: Re: Dynamic String) Anonymous Coward
2005-11-02  1:07           ` Robert A Duff
2005-11-02  8:10             ` Dmitry A. Kazakov [this message]
2005-11-01 22:31       ` Dynamic String Björn Persson
2005-11-02 10:56         ` Stefan Bellon
2005-11-02  0:18       ` Stephen Leake
2005-11-02  7:31         ` Harald Korneliussen
replies disabled

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