🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3499

Re: Multi-level break and elimination of GOTO

#3499
From: Greg Comeau
Date: Wed, 22 Nov 1995 23:19
31 lines
1795 bytes
In article <m0tFpAH-000FeXC@eyrie.demon.co.uk> Derek Fawcus <df@eyrie.demon.co.uk> writes:
>  How about:
>
>   iteration-statement:
>       while :<loop-name>opt ( <expression> ) <statement> 
>       do :<loop-name>opt <statement> while ( <expression> ) ; 
>       for :<loop-name>opt ( <expression>opt ; <expression>opt ; 
>               <expression>opt ) <statement>
>
>   selection-statement: 
>       switch :<loop-name>opt ( <expression> ) <statement>
>
>   jump-statement: 
>       break <loop-name>opt ; 
>       continue <loop-name>opt ;
>
>  Simply,  the optional loop name is _preceeded_ by a colon.  Wouldn't
>this also remove the ambiguity on the 'do ... while' as the colon comes
>before the name.  Hopefully,  this wouln't get confused with a normal
>label as do/while/for/switch are reserved names.

In isolation it would seem to address the situation, but in the grand
scheme of things would need to be analyzed, but even if ok, think
the confusion or whatever probably would not have it fly.  Too bad
we cannot flip : upside down ;-)

- Greg
-- 
       Comeau Computing, 91-34 120th Street, Richmond Hill, NY, 11418-3214
 Here:comeau@csanta.attmail.com / BIX:comeau or comeau@bix.com / CIS:72331,3421
    Voice:718-945-0009 / Fax:718-441-2310 / Prodigy: tshp50a / WELL: comeau
Technical Details
Message-ID: <490b59$3qt@panix.com>
Path: arc1-ca.pugleaf.net!in2.uu.net!panix!not-for-mail
References: <486cj7$o4s@news.mel.aone.net.au> <48bpa2$lmf@news.mel.aone.net.au> <m0tFpAH-000FeXC@eyrie.demon.co.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in2.uu.net!panix!not-for-mail
From: comeau@panix.com (Greg Comeau)
Newsgroups: comp.std.c,comp.lang.c
Subject: Re: Multi-level break and elimination of GOTO
Date: 22 Nov 1995 18:19:05 -0500
Organization: Comeau Computing
Message-ID: <490b59$3qt@panix.com>
References: <486cj7$o4s@news.mel.aone.net.au> <48bpa2$lmf@news.mel.aone.net.au> <m0tFpAH-000FeXC@eyrie.demon.co.uk>
Reply-To: comeau@csanta.attmail.com (Greg Comeau)
NNTP-Posting-Host: panix.com