Algol-style vs C-style semicolons - (nf)

Seaman ags at pucc-i
Fri Jun 15 01:04:12 AEST 1984


>  Sorry, but
>  	while ( expr ) statement
>  is not a C statement at all.  Where did you get the idea that this
>  is a complete statement?  Does YOUR compiler accept this idea?  etc.

By gosh, he's right!  According to K&R, p. 202, the correct form for a
while statement is not

	while ( expr ) statement
but
	while ( expression ) statement

It certainly pays to read.  :-)
-- 

Dave Seaman			"My hovercraft is full of eels."
..!pur-ee!pucc-i:ags



More information about the Comp.lang.c mailing list