Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!henry
From: henry@utzoo.UUCP (Henry Spencer)
Newsgroups: net.lang.c
Subject: Re: break and another use for goto's.
Message-ID: <4913@utzoo.UUCP>
Date: Sat, 12-Jan-85 20:07:35 EST
Article-I.D.: utzoo.4913
Posted: Sat Jan 12 20:07:35 1985
Date-Received: Sat, 12-Jan-85 20:07:35 EST
References: <7121@brl-tgr.ARPA>, <23@decvax.UUCP>
Organization: U of Toronto Zoology
Lines: 19
> 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