for <==> while (an exception)

VLD/VMB gwyn at BRL.ARPA
Sun Jul 14 17:01:34 AEST 1985


There is no problem; "for" is not entirely equivalent to the
corresponding "while" construct, as you have observed.
K&R didn't make this clear, although if you read about
"continue" in Appendix A, the difference becomes apparent.
Later commentators have usually been more careful in declaring
that the "for" loop is equivalent to the corresponding "while",
by adding a caveat about "continue".



More information about the Comp.lang.c mailing list