220 3591 <CAOHCbiuv0zLyEu-7RJR9rLzs-zwQRrxbkYjfO3jHTJj2GrGgYQ@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Tony V E <tvaneerd@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: "break break ;" etc. to break out of nested loops
Date: Fri, 5 Apr 2013 18:23:20 -0400
Lines: 106
Approved: news@gmane.org
Message-ID: <CAOHCbiuv0zLyEu-7RJR9rLzs-zwQRrxbkYjfO3jHTJj2GrGgYQ@mail.gmail.com>
References: <1f964e4b-2762-43b8-85e5-41392926b07a@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=f46d04016c39dc713504d9a488aa
X-Trace: ger.gmane.org 1365270588 14525 80.91.229.3 (6 Apr 2013 17:49:48 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 6 Apr 2013 17:49:48 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCUZ5QWKNQINVHP5RICRUBA7CC5GG@isocpp.org Sat Apr 06 19:49:50 2013
Return-path: <std-proposals+bncBCUZ5QWKNQINVHP5RICRUBA7CC5GG@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wi0-f200.google.com ([209.85.212.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCUZ5QWKNQINVHP5RICRUBA7CC5GG@isocpp.org>)
	id 1UOWZV-00057Y-Dm
	for gclcip-std-proposals@m.gmane.org; Sat, 06 Apr 2013 19:06:33 +0200
Original-Received: by mail-wi0-f200.google.com with SMTP id hi18sf2229787wib.3
        for <gclcip-std-proposals@m.gmane.org>; Sat, 06 Apr 2013 10:06:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-received:x-beenthere:x-received:received-spf:mime-version
         :x-received:in-reply-to:references:date:message-id:subject:from:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-google-group-id:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe:content-type;
        bh=Ak9Ve5YasTzlsOI8AA02lsYTtkl3+GR5WAOhZ1vlJ9s=;
        b=vJmskD23/F3gthFMs1VnIHUIEMbDmNyu2Y5fk+CuBvdDUZPjXRjZZDR5cY7uHErgJb
         Euwx11By2LuRf99iSTZRQngxinN6hYmP7CYXwUZWGt1KNHB1Gf0VF3nR0FcOKNIURB8D
         etVjfYLHDNygyb8tVPfAsePzuBr9UzDxsnrL/XRuyLmwazn0sp52Ur75jnYfeoVDF38l
         c/ELHV89VbMxRQPdTOZFqrgtHKZfN8S+tFxCJljcZhCkGl0ESRg5ZnxzxO5l5zlQ5kyj
         MgeHIGLFrYWyPa7g5KCEH/Q08MOwsRNoYc7YgJdPoH5NI72iYxUgaZBr4XumlDvFOMWP
  
X-Received: by 10.112.34.37 with SMTP id w5mr2388142lbi.8.1365200602768;
        Fri, 05 Apr 2013 15:23:22 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.145.136 with SMTP id su8ls207034lab.59.gmail; Fri, 05 Apr
 2013 15:23:21 -0700 (PDT)
X-Received: by 10.152.133.133 with SMTP id pc5mr7148743lab.32.1365200601201;
        Fri, 05 Apr 2013 15:23:21 -0700 (PDT)
Original-Received: from mail-la0-x22d.google.com (mail-la0-x22d.google.com [2a00:1450:4010:c03::22d])
        by mx.google.com with ESMTPS id iz6si5707641lab.84.2013.04.05.15.23.21
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Fri, 05 Apr 2013 15:23:21 -0700 (PDT)
Received-SPF: pass (google.com: domain of tvaneerd@gmail.com designates 2a00:1450:4010:c03::22d as permitted sender) client-ip=2a00:1450:4010:c03::22d;
Original-Received: by mail-la0-f45.google.com with SMTP id fn20so434650lab.4
        for <std-proposals@isocpp.org>; Fri, 05 Apr 2013 15:23:20 -0700 (PDT)
X-Received: by 10.112.82.164 with SMTP id j4mr7136712lby.112.1365200600851;
 Fri, 05 Apr 2013 15:23:20 -0700 (PDT)
Original-Received: by 10.112.83.103 with HTTP; Fri, 5 Apr 2013 15:23:20 -0700 (PDT)
In-Reply-To: <1f964e4b-2762-43b8-85e5-41392926b07a@isocpp.org>
X-Original-Sender: tvaneerd@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of tvaneerd@gmail.com designates 2a00:1450:4010:c03::22d as permitted
 sender) smtp.mail=tvaneerd@gmail.com;       dkim=pass header.i=@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:3591
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/3591>

--f46d04016c39dc713504d9a488aa
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Apr 5, 2013 at 3:23 PM, <temptony@freemail.hu> wrote:

> I suggest the following syntax:
>
> The *break break* statement jumps out of the second-nearest enclosing *do,
> for, switch, *or *while *statement.
> The *break break* *break *statement jumps out of the third-nearest
> enclosing *do, for, switch, *or *while *statement.
> The *break break* *break break *statement jumps out of the fourth-nearest
> enclosing *do, for, switch, *or *while *statement.
>
>
break;
break(2);
break(3);
break(4);

(and break(1) would also work).

Not sure about runtime values

int n = ...
break(n);

And I'd rather have:

break name;

For a named loop construct somehow. Maybe

label: for (;;)
{
   break label;
}


And all that is not saying I agree with any of it, or really want it; just
some suggestions.

Tony

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.



--f46d04016c39dc713504d9a488aa
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><br><div class=3D"gmail=
_quote">On Fri, Apr 5, 2013 at 3:23 PM,  <span dir=3D"ltr">&lt;<a href=3D"m=
ailto:temptony@freemail.hu" target=3D"_blank">temptony@freemail.hu</a>&gt;<=
/span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">I suggest the following syntax:<div><div><br=
></div><div>The=A0<b>break=A0break</b> statement jumps out of the second-ne=
arest enclosing=A0<b>do, for, switch,=A0</b>or=A0<b>while=A0</b>statement.<=
br>
</div><div>The=A0<b>break=A0break</b>=A0<b>break=A0</b>statement jumps out =
of the third-nearest enclosing=A0<b>do, for, switch,=A0</b>or=A0<b>while=A0=
</b>statement.<br></div><div>The=A0<b>break=A0break</b>=A0<b>break break=A0=
</b>statement jumps out of the fourth-nearest enclosing=A0<b>do, for, switc=
h,=A0</b>or=A0<b>while=A0</b>statement.<br>
</div><div><br></div></div></blockquote><div><br></div><div>break;<br>break=
(2);<br>break(3);<br></div><div>break(4);<br>=A0<br></div>(and break(1) wou=
ld also work).<br><br></div><div class=3D"gmail_quote">Not sure about runti=
me values<br>
<br></div><div class=3D"gmail_quote">int n =3D ...<br></div><div class=3D"g=
mail_quote">break(n);<br><br></div><div class=3D"gmail_quote">And I&#39;d r=
ather have:<br><br></div><div class=3D"gmail_quote">break name;<br><br></di=
v><div class=3D"gmail_quote">
For a named loop construct somehow. Maybe<br><br></div><div class=3D"gmail_=
quote">label: for (;;)<br>{<br></div><div class=3D"gmail_quote">=A0=A0 brea=
k label;<br>}<br><br></div><div class=3D"gmail_quote"><br></div><div class=
=3D"gmail_quote">
And all that is not saying I agree with any of it, or really want it; just =
some suggestions.<br><br></div><div class=3D"gmail_quote">Tony<br><br></div=
></div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
&nbsp;<br />
&nbsp;<br />

--f46d04016c39dc713504d9a488aa--

.
