Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!usc!cs.utexas.edu!tut.cis.ohio-state.edu!raksha.eng.ohio-state.edu!rob From: rob@raksha.eng.ohio-state.edu (Rob Carriere) Newsgroups: comp.lang.c Subject: meaning of continue (WAS: Some interesting novice questions [...]) Message-ID: <6065@raksha.eng.ohio-state.edu> Date: 29 Oct 90 03:47:31 GMT References: <2422@charon.cwi.nl> Reply-To: rob@raksha.eng.ohio-state.edu (Rob Carriere) Organization: The Ohio State University Dept of Electrical Engineering Lines: 56 In article stanley@phoenix.com (John Stanley) writes: >dik@cwi.nl (Dik T. Winter) writes: > >> Calm down please. Rahul Dhesis idea is not that wrong. > > I am perfectly calm. The definition of continue was both fatally >anthropomorphic and incorrect. The fatality of course only applies to those of us who are allergic to anthropomorphisms. The rest of us is fortunately able to use a very powerful mental tool. >> > The correct definition of "continue", in the C language >> > context, is "go to the top of the smallest enclosing while, do, or for." >> This is wrong, it is not go to the top, but go to the bottom! > > Please argue with M.I. Bolsky of the Systems Training Center at AT&T >Bell Labs. This is a direct quote of his. So? I would accept K&R or H&S quotes (for pre-ANSI C), or quotes from the standard (for ANSI C). Anything else is what the courts call hearsay. If you want to exchange quotes, here's H&S2 (pg 217-218) "Execution of a _continue_ statement causes execution of the body of the smallest enclosing _while_, _do_ or _for_ statement to be terminated. Program control is immediately transferred to the end of the body..." ^^^^^^^^^^^^^^^ Aka the bottom... > Your definition is also wrong. K&R 2ed, p. 65, "continue ... causes >the the next iteration of the enclosing for, while, or do loop to begin." >It does not refer to "Hey, you! Try again", nor to "go to the bottom". Please observe that K&R2 contradicts your previous authority... Also please observe that the `definition' Mr. Winter supplied, while informal, will get a human code-executer to do the right thing. Finally, one could define continue to mean that `execution continues with the test expression of the innermost enclosing loop'. Would you claim this wrong because K&R2 does not refer to `test expression'? In other words, your concept of correctness is flawed. >> To correct Rahuls words: >> "Hey you! I have seen this, now please get the next one, if any!" > > Still fatally anthropomorphic. And impolite. There is no "Thank you" >statement. One is reminded of the subgroup of the social scientists who desperately try to cast their every observation in the most polysyllabic terms available, thinking to make their field appear more `scientific' that way. Of all the engineering disciplines and all the `hard' sciences, Computer Science is the only field where a significant fraction of the population objects to anthropomorphisms. SR ---