break <label> and another use for goto's.

Henry Spencer henry at utzoo.UUCP
Sun Jan 13 11:07:35 AEST 1985


> While scanning the source of a module done by one of
> my collegues, I noticed a label at the start of a module.
> "Why did you need a goto here?"
> 
> His reply was that he uses
> 
> 	label:	...
> 		goto label;
> 
> to delimit an outer loop that goes on for several pages as
> you can easily lose visual track of {...} nesting levels.

The right comment on this is "why don't you split that loop body
up into separate functions, as God clearly intended?" :-).  If it's
long enough to make tracking indenting levels difficult, it's too
long to be in one monolithic piece.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



More information about the Comp.lang.c mailing list