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 07:46:59 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!cambridge1-snf1.gtei.net!news.gtei.net!bos-service1.ext.raytheon.com!dfw-service2.ext.raytheon.com.POSTED!not-for-mail Message-ID: <3E28256C.30C83F8A@raytheon.com> From: Mark Johnson X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Keyword "null" Question References: <3E281B97.76F47E30@noSpam.raytheon.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 17 Jan 2003 09:46:52 -0600 NNTP-Posting-Host: 192.27.48.39 X-Complaints-To: news@ext.ray.com X-Trace: dfw-service2.ext.raytheon.com 1042818419 192.27.48.39 (Fri, 17 Jan 2003 09:46:59 CST) NNTP-Posting-Date: Fri, 17 Jan 2003 09:46:59 CST Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:33132 Date: 2003-01-17T09:46:52-06:00 List-Id: 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. Hmm. Actually in 5.1(13) I read... The execution of a null_statement has no effect. so the NO OP is not required (and I could argue should not even appear). Without knowing what "SOME_EVENT_TOOK_PLACE" does, it appears to me that this code is calling the function and discarding the return value (to avoid the generation of a local variable). If it is a timing issue - it appears to be a quite subtle one (and fraught with error in the case of translation). However, now that I think about it some more, the code may have been present to provide a "hook" for a breakpoint. You could break on the null statement to then walk through the condition you are trying to debug. --Mark