From: dog.ee.lbl.gov!network.ucsd.edu!swrinde!mips!zaphod.mps.ohio-state.edu!so
Subject: Re: Ada statement
Date: 15 Jan 92 01:15:57 GMT [thread overview]
Message-ID: <1992Jan15.011557.29353@cs.rose-hulman.edu> (raw)
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
next reply other threads:[~1992-01-15 1:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
1992-01-15 1:15 dog.ee.lbl.gov!network.ucsd.edu!swrinde!mips!zaphod.mps.ohio-state.edu!so [this message]
-- strict thread matches above, loose matches on Subject: below --
1992-01-15 17:37 Ada statement bu.edu!rpi!usenet.coe.montana.edu!ogicse!verdix!brucej
1992-01-15 17:13 Stan McQueen
1992-01-15 15:11 Greg Harvey
1992-01-15 6:09 dog.ee.lbl.gov!network.ucsd.edu!usc!sdd.hp.com!uakari.primate.wisc.edu!us
1992-01-15 6:04 csus.edu!wupost!zaphod.mps.ohio-state.edu!mips!cs.uoregon.edu!nntp.uorego
1992-01-14 22:16 Jim Giles
1992-01-14 21:39 Jeffrey M. Schweiger
1992-01-14 20:49 david.c.willett
1992-01-14 19:18 Brian Hanafee
1992-01-14 3:13 csus.edu!wupost!spool.mu.edu!news.cs.indiana.edu!bronze!master.cs.rose-hu
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox