do-while construct

Doug Gwyn gwyn at smoke.ARPA
Sat Oct 8 12:53:46 AEST 1988


The
	loop	stuff
	until	condition
		more_stuff
	pool
construct is the most general form of loop.  It would be useful
if it were the ONLY loop construct in an Algol-like language.
However, C has several loop constructs for reasons of convenience,
and the exit from the middle of a loop is easily accomplished:
	for(;;) {
		stuff
	if(condition) break;
		more_stuff
	}
so that there is no real need to add such a construct.  Save it
for a new programming language (D?).



More information about the Comp.lang.c mailing list