Correction of documentation for-statement in C-C++reference

Mart Verburg mart.verburg at c2i.net
Mon Oct 7 17:05:28 UTC 2002


After consulting with various other sources, I came to the conclusion there's a minute slip in the documentation of the for-loop in your C-C++ reference.

It says in short the for loop acts as the equivalent of a do-while loop, with an initialisation prepended.  My other sources categorically explain that when the evaluation statement in the middle of the for-loop results in a FALSE, the body is newer executed.  This makes it the equivalent of a while-do loop.  The update statement at the right of the for-loop is executed AFTER the body of the loop.

I've sent a patch for this to
	ftp://fara.cs.uni-potsdam.de/incoming/
It's called
	c_cpp_reference-2.0.1-for_loop_correction.patch

Greetings,

  Mart

-- 
As you know, birds do not have sexual organs because they would
interfere with flight.  [In fact, this was the big breakthrough for the
Wright Brothers.  They were watching birds one day, trying to figure
out how to get their crude machine to fly, when suddenly it dawned on
Wilbur.  "Orville," he said, "all we have to do is remove the sexual
organs!"  You should have seen their original design.]  As a result,
birds are very, very difficult to arouse sexually.  You almost never
see an aroused bird.  So when they want to reproduce, birds fly up and
stand on telephone lines, where they monitor telephone conversations
with their feet.  When they find a conversation in which people are
talking dirty, they grip the line very tightly until they are both
highly aroused, at which point the female gets pregnant.
		-- Dave Barry, "Sex and the Single Amoeba: What Every
		   Teen Should Know"






More information about the KDevelop-devel mailing list