From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 15 Jan 92 01:15:57 GMT From: dog.ee.lbl.gov!network.ucsd.edu!swrinde!mips!zaphod.mps.ohio-state.edu!so l.ctr.columbia.edu!bronze!master.cs.rose-hulman.edu!susan.cs.rose-hulman.edu!ei genstr@ucbvax.Berkeley.EDU (Todd R. Eigenschink) Subject: Re: Ada statement Message-ID: <1992Jan15.011557.29353@cs.rose-hulman.edu> List-Id: In article <1992Jan14.221658.7468@beta.lanl.gov>, jlg@cochiti.lanl.gov (Jim Gil es) writes: |> In article <1992Jan14.204928.21571@cbnewsl.cb.att.com>, willett@cbnewsl.cb.a tt.com (david.c.willett) writes: |> |> [...] |> |> You can use the NULL statement as one alternative of a conditonal |> |> accept, or as an alternative in a conditonal. In both cases, it |> |> would be analogous to the FORTRAN or C "continue". |> |> The Fortran continue and the C continue do completely different things. |> In Fortran, continue does nothing and is a convenient place to hang |> a statement label. In C, a continue statement causes the rest of the |> innermost loop to be skipped and for the next pass of the loop to begin |> (ie. the "cycle" statement in some languages). The C feature which |> resembles a Fortran continue is ";" - the NULL statement - same as |> Ada. |> |> |> J. Giles Thanks for the responses. All of them seemed to center around the same basic things. I do have one opinion different than that which was expressed, about C's "null" statement. True, a semicolon won't do anything if just inserted into code. However, it is my understanding (perhaps I'm wrong, and I don't have my K&R handy to check this) that the semicolon is a statement terminator...so C's null statement is _really_ null! (And therefore not necessary.) What about something like: for (i = 0; i < 10; i++) ; As far as I know, the semicolon just terminates the statement, which doesn't have any body (except for the i++). Well, anyway, I'm glad I know. I still don't see the point in demanding a statement which does nothing, but I'll accept it. Oh, yeah...and somebody (can't find the post) said something about writing a lot more code in the real world. Unless I'm mistaken, the average programmer for a government project produces something like 10 lines of code per day. (Just shows the emphasis on design, I guess. :-> ) -- Todd Eigenschink eigenstr@CS.Rose-Hulman.Edu