From 1578959326944711691
X-Google-Thread: 7894ca11fe,d47b345505a72a70
X-Google-Attributes: gid7894ca11fe,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news2.google.com!news1.google.com!news.glorb.com!news.alt.net!frodo.cs.rpi.edu!not-for-mail
From: Hyman Rosen <hyrosen@mail.com>
Newsgroups: comp.std.c++
Subject: Re: for-else: adding else to for loops
Date: Wed, 19 Aug 2009 20:45:11 CST
Organization: unknown
Lines: 19
Sender: cppmods@cs.rpi.edu
Approved: james.dennett@gmail.com
Message-ID: <IRGim.145044$Qg6.101710@newsfe14.iad>
References: <5d82cd6c-2a22-4dd7-8c7d-790b579533ea@d15g2000prc.googlegroups.com>
	<9e9c2ca5-78eb-460c-adec-2ec051c54210@r18g2000yqd.googlegroups.com>
	<E1ihm.95676$BP6.35009@newsfe24.iad>
	<b3293cf8-8b06-4660-9581-50cadc471a3b@a13g2000yqc.googlegroups.com>
	<h6becd$jds$1@news.ett.com.ua>
	<999e529c-49b8-4e86-a9de-aa6a545289aa@a26g2000yqn.googlegroups.com>
NNTP-Posting-Host: netlab.cs.rpi.edu
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
To: (Usenet)
Return-Path: <cppmods@ruralroute.cs.rpi.edu>
X-Original-Date: Tue, 18 Aug 2009 19:31:44 -0400
X-Submission-Address: std-c++@netlab.cs.rpi.edu
Xref: g2news2.google.com comp.std.c++:1309

James Kanze wrote:
>
> A native supporting syntax for what?  I haven't yet figured out
> what the OP wants (except maybe another tool for obfuscation).

Providing control flow after loop exit which distinguishes
between the loop having exited because its test condition
was false and the loop having exited through a break (and
in my syntax, also for the loop never having been executed).

Without special syntax, you wind up with additional boolean
variables or with repeated tests or with deeply indented code.

--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]



