a style question

Henry Spencer henry at zoo.toronto.edu
Sun Sep 30 15:06:55 AEST 1990


In article <7341 at darkstar.ucsc.edu> aryeh at cash.uucp (the over worked C something or another) writes:
>Since I going to be doing my first team effort I want to know if this is bad 
>style:
>	for(x=0;x!=100;x++) ...

Most people find it more readable with a bit of space and the statement
on the next line:

	for (x = 0; x != 100; x++)
		...

The cautious would also recommend `x <= 100', but in this situation that
is arguable.

I assume `x' is an integer variable, not floating-point.
-- 
Imagine life with OS/360 the standard  | Henry Spencer at U of Toronto Zoology
operating system.  Now think about X.  |  henry at zoo.toronto.edu   utzoo!henry



More information about the Comp.lang.c mailing list