Loop "Equivalencies"

Robert J. Devine devine at asgb.UUCP
Fri Nov 22 06:35:01 AEST 1985


> I'd like to point out what I think is a bug in Kernighan & Ritchie.
> My version's copyright is 1978; please excuse this if I have an old
> version and newer versions (?) have fixed it.
>
> [ description about C's problem that stems from the "continue" statement
> used in loops and the defined equivalence between for loops and while loops ]

  The problem is noted in "C A Reference Manual" by Harbison and Steele.
This 1984 book offers a much better description of current C than K&R does.
Much has been added (enums, structure assignment, "void", etc) since 1978.
Buy this book!

  System V also has a more up-to-date document on C, you should take a look
at that because it describes AT&T's implementation.

  And yes, the "continue" ambiguity is still there...

Bob



More information about the Comp.lang.c mailing list