Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site decvax.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!minow
From: minow@decvax.UUCP (Martin Minow)
Newsgroups: net.lang.c
Subject: break and another use for goto's.
Message-ID: <23@decvax.UUCP>
Date: Thu, 10-Jan-85 18:40:10 EST
Article-I.D.: decvax.23
Posted: Thu Jan 10 18:40:10 1985
Date-Received: Sat, 12-Jan-85 06:28:28 EST
References: <7121@brl-tgr.ARPA>
Lines: 27
break failed to win widespread acceptance because
people couldn't agree where the label goes (anywhere, or
should it label the "proper" enclosing block, or what.
Goto, as noted, gives the necessary piece of information
and can serve as a visible warning that something special
is going on.
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 moral is that goto is a perfectly valid addition to
a programmer's toolkit and that squeezing the last goto
out of a module may make it less maintainable even though
it improves the module's "structuredness".
Martin Minow
decvax!minow