Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site hcrvx1.UUCP
Path: utzoo!hcrvax!hcrvx1!tracy
From: tracy@hcrvx1.UUCP (Tracy Tims)
Newsgroups: net.lang.c
Subject: Re: "break " vs. "goto "
Message-ID: <1076@hcrvx1.UUCP>
Date: Fri, 11-Jan-85 10:47:57 EST
Article-I.D.: hcrvx1.1076
Posted: Fri Jan 11 10:47:57 1985
Date-Received: Sat, 12-Jan-85 04:16:38 EST
References: <7096@brl-tgr.ARPA> <7121@brl-tgr.ARPA>
Organization: Human Computing Resources, Toronto
Lines: 26
>> Yuck! "break ;" is an accident looking for a place to happen!
>> If one has to have this facility, "break ;" is far superior.
> And "goto " is even better, you don't have to change the language
> at all.
In "break ;" the label is used to identify the control structure being
exited, rather than the place being exited to. It is more robust in terms of
future program changes, and it has the advantage of being defined only in terms
of structured constructs.
loop1: while ( ) {
.
.
while ( ) {
.
break loop1;
.
}
.
.
}
Tracy Tims {linus,allegra,decvax}!watmath!...
Human Computing Resources Corporation {ihnp4,utzoo}!...
Toronto, Ontario, Canada. 416 922-1937 ...hcr!hcrvx1!tracy