Article View: comp.std.c
Article #3486Re: Multi-level break and elimination of GOTO
From: Lawrence Kirby
Date: Sun, 12 Nov 1995 20:36
Date: Sun, 12 Nov 1995 20:36
31 lines
1909 bytes
1909 bytes
In article <485hl3$6e7@news0.rain.rg.net> plong@perf.com "Paul Long" writes:
>Lawrence Kirby <fred@genesis.demon.co.uk> wrote:
>[snip]
>>It would be quite reasonable to specify the grammar to limit this type
>>of label only to compound statements.
>
>Ugh. Special cases are the bane of useability.
I don't believe so in this case. It is very unlikely that they would be
used in situations where the statement being jumped out of is not a
compound statement. Where you have nested loops you're not really losing
anything by forcing the outer loop to use { and } instead of ;
>>In fact one of the possibilities
>>is simply to define a compound statement label which has scope limited
>>to within the compound statement labelled.
>
>You're getting close to situation indicators, which I would prefer if
>I were defining a new language. I think labeled loops are a hack--I
>would want something both more general and unified, not optional
>clauses to sundry existing constructs.
This imposes the same limitation of having to use compound statements as
the first suggestion.
--
-----------------------------------------
Lawrence Kirby | fred@genesis.demon.co.uk
Wilts, England | 70734.126@compuserve.com
-----------------------------------------
Technical Details
Message-ID:
<816208586snz@genesis.demon.co.uk>Path:
arc1-ca.pugleaf.net!mail2news.demon.co.uk!genesis.demon.co.ukReferences:
<47s7l0$r18@news.mel.aone.net.au> <815950407snz@genesis.demon.co.uk> <480eio$2uf@news0.rain.rg.net> <481trh$cuj@news0.rain.rg.net> <816099986snz@genesis.demon.co.uk> <485hl3$6e7@news0.rain.rg.net>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!mail2news.demon.co.uk!genesis.demon.co.uk From: Lawrence Kirby <fred@genesis.demon.co.uk> Newsgroups: comp.std.c,comp.lang.c Subject: Re: Multi-level break and elimination of GOTO Date: Sun, 12 Nov 95 20:36:26 GMT Organization: none Message-ID: <816208586snz@genesis.demon.co.uk> References: <47s7l0$r18@news.mel.aone.net.au> <815950407snz@genesis.demon.co.uk> <480eio$2uf@news0.rain.rg.net> <481trh$cuj@news0.rain.rg.net> <816099986snz@genesis.demon.co.uk> <485hl3$6e7@news0.rain.rg.net> Reply-To: fred@genesis.demon.co.uk X-NNTP-Posting-Host: genesis.demon.co.uk X-Newsreader: Demon Internet Simple News v1.27