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,3b98a26890a2d400 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-17 10:21:04 PST Message-ID: <3E284871.5060809@cogeco.ca> From: "Warren W. Gay VE3WWG" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Keyword "null" Question References: <3E281B97.76F47E30@noSpam.raytheon.com> <3E2830ED.C37F586D@praxis-cs.co.uk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 17 Jan 2003 13:16:17 -0500 NNTP-Posting-Host: 198.96.47.195 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1042827377 198.96.47.195 (Fri, 17 Jan 2003 13:16:17 EST) NNTP-Posting-Date: Fri, 17 Jan 2003 13:16:17 EST Organization: Bell Sympatico Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!torn!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Xref: archiver1.google.com comp.lang.ada:33154 Date: 2003-01-17T13:16:17-05:00 List-Id: Peter Amey wrote: > Michael Bustillo wrote: > >>While reviewing the Ada LRM, it makes note that the Ada keyword "null" >>does nothing except pass to the next statement. This seems intuitive >>enough, however... >> >>I'm currently attempting to reverse engineer some code so that it can be >>converted to another language, and I've run across the following: >> >> if SOME_EVENT_TOOK_PLACE then >> null; >> end if; >> >>This statement is simply standing alone by itself, not part of any >>"case-like" structure or anything sneaky. I guess my question is when >>it says "...it does nothing..." does it actually mean that it is putting >>a NO OP there? Because then this would actually be doing something, >>most likely a timing issue, and that's what I need to know. >> >>I appreciate your time, and thanks. > > > I would have thought that this is most likely a hook for some planned > future development. I have written code that cased or looped over an > enumeration type with a single element for example where extension > seemed likely. I am confident that the source statements would not > generate any object code given any half-decent optimization. > > Peter One other possibility might be that it was pre-processed by some tool that precompiled out some optional code (something like gnatprep). Or more likely, the code that used to be there was commented out and a null was stuck in there to make it compile ;-) -- Warren W. Gay VE3WWG http://home.cogeco.ca/~ve3wwg