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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,34872f3f22b5b140 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-11 12:32:23 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!news.gtei.net!news-out.visi.com!hermes.visi.com!sn-xit-05!sn-xit-01!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Suggestion for gnatstub Date: Mon, 11 Nov 2002 14:32:35 -0600 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <3dcb9e51$0$303$bed64819@news.gradwell.net> <3DCBC4C9.AD436CD9@earthlink.net> X-Newsreader: Microsoft Outlook Express 4.72.3612.1700 X-Mimeole: Produced By Microsoft MimeOLE V4.72.3719.2500 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:30744 Date: 2002-11-11T14:32:35-06:00 List-Id: Robert A Duff wrote in message ... >"Marin David Condic" writes: > >> I can't think of too many other reasons to write a null procedure. If it was >> going to stay null forever, then why have it at all. Seems like the >> mechanism is there so you can have a procedure waiting for the programmer to >> find the elusive Round Tuit. :-) > >I can't think of "too many", either, but I can think of some. Just the >other day I wrote a generic procedure to walk a tree. The generic takes >two generic formal procedures, Pre_Action and Post_Action, which are >called during the tree at the points you would guess. They have >defaults, "is Do_Nothing", so you can specify one or the other. >Guess what procedure Do_Nothing looks like. ;-) Most action routines (callbacks) in Claw are defined as procedure When_something (...) is null; end When_something; These may be overridden in for a derived type, but the original routine is likely to remain with a null body forever. I believe this is common in object-oriented code. Randy.