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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,33fc00a6ce6be410 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed.freenet.de!newsfeed01.chello.at!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: not null access procedure Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1130753721.639869.322210@g43g2000cwa.googlegroups.com> <1130832161.671656.88230@o13g2000cwo.googlegroups.com> <1130875772.717413.45520@g14g2000cwa.googlegroups.com> Date: Wed, 2 Nov 2005 09:10:42 +0100 Message-ID: NNTP-Posting-Date: 02 Nov 2005 09:08:49 MET NNTP-Posting-Host: 76ff1aa0.newsread2.arcor-online.net X-Trace: DXC=L1Cm@35@aJCfS]5RcNSd9MQ5U85hF6f;DjW\KbG]kaMHQ>n?D9BSA]L2l84:\?TkBI[6LHn;2LCVN7enW;^6ZC`D<=9bOTW=MNN X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:6109 Date: 2005-11-02T09:08:49+01:00 List-Id: On 01 Nov 2005 20:07:47 -0500, Robert A Duff wrote: > Anonymous Coward 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