Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22180 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74534 invoked by uid 1010); 7 Mar 2006 09:56:20 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 74519 invoked from network); 7 Mar 2006 09:56:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Mar 2006 09:56:20 -0000 X-Host-Fingerprint: 80.123.98.46 unknown Received: from ([80.123.98.46:10713] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id C3/92-22029-3C85D044 for ; Tue, 07 Mar 2006 04:56:19 -0500 Message-ID: To: internals@lists.php.net Date: Tue, 07 Mar 2006 10:56:23 +0100 User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 References: <000001c641c9$80dbfad0$6e02a8c0@thinkpad> <11.E1.22029.BE55D044@pb1.pair.com> <440D56E0.9050200@lerdorf.com> In-Reply-To: <440D56E0.9050200@lerdorf.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 80.123.98.46 Subject: Re: [PHP-DEV] Re: GOTO and/or BREAK LABEL From: mike@php.net (Michael Wallner) Rasmus Lerdorf wrote: > Michael Wallner wrote: > >> Dmitry Stogov wrote: >> >>> 1) goto and break label >> >> +0 >> >>> 3) break label only (like Java) >> >> +1 > > > You do realize that this is: > > label: > while(condition) { > break label; > } > > As a C programmer this confuses me to no end. When I see "label:" I > expect control to end up there and the loop to be executed again. I > realize all the Java folks have gotten used to this, but I don't think I > ever will. Yes, but it's quite obvious to me if I replace the labeled break with `break 1;` I'd expect `continue label;` to step into the loop again. By the way, +0 does not mean -1 for goto. Regards, -- Michael - http://dev.iworks.at/ext-http/http-functions.html.gz