Article View: comp.std.c
Article #3469Re: Multi-level break and elimination of GOTO
From: Charles Fu
Date: Sat, 11 Nov 1995 02:20
Date: Sat, 11 Nov 1995 02:20
40 lines
1394 bytes
1394 bytes
>In article <47s7l0$r18@news.mel.aone.net.au>
>> do
>> {
>> while inner (exp1)
>> {
>> if (exp2)
>> break outer;
>> }
>> } while outer;
>> Not as pretty is it? But then again do loops never were as nice as the
>> others.
In article <815950407snz@genesis.demon.co.uk>,
Lawrence Kirby <fred@genesis.demon.co.uk> wrote:
> Writing it as:
> do outer
> {
> } while ()
> seems to be most consistent with the other constructs.
This might cause a problem because it's very similar to
do outer
;
while (whatever)
which is currently legal syntax.
Perhaps a C++-ish syntax like
do<outer> {
while<inner>(exp1) {
if (exp2)
break outer; /* or break<outer> */
}
} while (whatever);
would be clearer and simpler to parse.
-ccwf
Technical Details
Message-ID:
<4811a6$o1v@gap.cco.caltech.edu>Path:
arc1-ca.pugleaf.net!locke.klab.caltech.edu!ccwfReferences:
<43pdut$hoh@galaxy.csc.calpoly.edu> <DF8FE3.97H@news.cern.ch> <47s7l0$r18@news.mel.aone.net.au> <815950407snz@genesis.demon.co.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!locke.klab.caltech.edu!ccwf From: ccwf@locke.klab.caltech.edu (Charles Fu) Newsgroups: comp.std.c,comp.lang.c Subject: Re: Multi-level break and elimination of GOTO Date: 11 Nov 1995 02:20:54 GMT Organization: California Institute of Technology, Pasadena Message-ID: <4811a6$o1v@gap.cco.caltech.edu> References: <43pdut$hoh@galaxy.csc.calpoly.edu> <DF8FE3.97H@news.cern.ch> <47s7l0$r18@news.mel.aone.net.au> <815950407snz@genesis.demon.co.uk> NNTP-Posting-Host: locke.klab.caltech.edu