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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no 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-18 06:47:52 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn14feed!wn12feed!wn11feed!worldnet.att.net!207.217.77.102!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!harp.news.atl.earthlink.net!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Keyword "null" Question Date: Sat, 18 Jan 2003 09:46:50 -0500 Organization: MindSpring Enterprises Message-ID: References: <3E281B97.76F47E30@noSpam.raytheon.com> NNTP-Posting-Host: d1.56.b0.f0 X-Server-Date: 18 Jan 2003 14:47:50 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Xref: archiver1.google.com comp.lang.ada:33177 Date: 2003-01-18T14:47:50+00:00 List-Id: That's going to depend on the optimizer for your particular compiler. The language only specifies that in some "virtual machine" sense, nothing happens that impacts your program - timing issues not being considered. I believe that it is possible for the optimizer to look at the whole "if" statement and throw it away - but I could be wrong about this. (I have not had to review that aspect of the standard for some time.) That could have implications if the logical expression in the "if" had side effects. (Someone with better knowledge than I have might want to correct this...) You need to check the output of your compiler with various optimization levels set. Note that it is legal for a compiler to do something illegal while optimizing just so long as there is some mode in which the compiler does what the ARM requires. (IOW, if optimizing away the if chech were illegal, it still might be made to do so in some optimization mode, so long as in some "Standard Ada" mode it does not.) MDC -- ====================================================================== Marin David Condic I work for: http://www.belcan.com/ My project is: http://www.jast.mil/ Send Replies To: m c o n d i c @ a c m . o r g "I'd trade it all for just a little more" -- Charles Montgomery Burns, [4F10] ====================================================================== Michael Bustillo wrote in message news:3E281B97.76F47E30@noSpam.raytheon.com... > 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. >