Re: Re: GOTO and/or BREAK LABEL
From: Bart de Boer Date: Wed, 08 Mar 2006 14:27:05 +0000 Subject: Re: Re: GOTO and/or BREAK LABEL References: 1 2 3 Groups: php.internals Request: Send a blank email to [email protected] to get a copy of this message
Rasmus Lerdorf wrote:Michael Wallner wrote:If we do both goto and labeled breaks you can get your expected behaviour with: label: while(condition) {Dmitry Stogov wrote:You do realize that this is: label: while(condition) {1) goto and break label+03) break label only (like Java)+1break 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. -Rasmusgoto label;} right? Using break in the un-expected way together with goto gives you both options. FWIW (And that's probably not much ;) ) my vote would be: 1) 1 (goto and break label) 2) 0 3) 0 4) 0 Bart
Thread (106 messages)
« previous | php.internals (#22246) | next » |
---|