Re: [PHP] speaking of control structures...

2009-05-07 Thread Tom Worster
On 5/6/09 9:31 PM, Clancy clanc...@cybec.com.au wrote: I can understand your reluctance to disregard your mother's advice, but unfortunately she had been brainwashed to accept the dogma of the day. actually, i don't believe so. she did numerical work so she continued using fortran and

Re: [PHP] speaking of control structures...

2009-05-07 Thread Robert Cummings
On Thu, 2009-05-07 at 09:33 -0400, Tom Worster wrote: On 5/6/09 9:31 PM, Clancy clanc...@cybec.com.au wrote: I can understand your reluctance to disregard your mother's advice, but unfortunately she had been brainwashed to accept the dogma of the day. actually, i don't believe so. she

Re: [PHP] speaking of control structures...

2009-05-07 Thread Nathan Rixham
Robert Cummings wrote: On Thu, 2009-05-07 at 09:33 -0400, Tom Worster wrote: On 5/6/09 9:31 PM, Clancy clanc...@cybec.com.au wrote: I can understand your reluctance to disregard your mother's advice, but unfortunately she had been brainwashed to accept the dogma of the day. actually, i don't

RE: [PHP] speaking of control structures...

2009-05-07 Thread bruce
you know... interesting that goto can be found in code!! -Original Message- From: Robert Cummings [mailto:rob...@interjinn.com] Sent: Thursday, May 07, 2009 7:36 AM To: Tom Worster Cc: Clancy; php-general@lists.php.net Subject: Re: [PHP] speaking of control structures... On Thu, 2009

Re: [PHP] speaking of control structures...

2009-05-07 Thread Clancy
On Thu, 07 May 2009 09:33:00 -0400, f...@thefsb.org (Tom Worster) wrote: On 5/6/09 9:31 PM, Clancy clanc...@cybec.com.au wrote: I can understand your reluctance to disregard your mother's advice, but unfortunately she had been brainwashed to accept the dogma of the day. actually, i don't

Re: [PHP] speaking of control structures...

2009-05-06 Thread Marcus Gnaß
Tom Worster wrote: there's a control structure i wish php had: a simple block that you can break out of, e.g. As Maarten pointed out you could use a function. Another alternative is to use Exceptions which might be the most proper way to do it. -- PHP General Mailing List

Re: [PHP] speaking of control structures...

2009-05-06 Thread Robert Cummings
On Wed, 2009-05-06 at 12:56 +0200, Marcus Gnaß wrote: Tom Worster wrote: there's a control structure i wish php had: a simple block that you can break out of, e.g. As Maarten pointed out you could use a function. Another alternative is to use Exceptions which might be the most proper

Re: [PHP] speaking of control structures...

2009-05-06 Thread Tom Worster
On 5/6/09 7:05 AM, Robert Cummings rob...@interjinn.com wrote: That seems like an abuse of exceptions. But then we're already abusing loops. I just don't think one could say it's the proper way to do it :) i don't have a lot of interest in the proper way to do things. i'm interested in how

Re: [PHP] speaking of control structures...

2009-05-06 Thread Tom Worster
On 5/6/09 6:56 AM, Marcus Gnaß gona...@gmx.de wrote: Tom Worster wrote: there's a control structure i wish php had: a simple block that you can break out of, e.g. As Maarten pointed out you could use a function. Another alternative is to use Exceptions which might be the most proper way to

Re: [PHP] speaking of control structures...

2009-05-06 Thread Robert Cummings
On Wed, 2009-05-06 at 08:41 -0400, Tom Worster wrote: On 5/6/09 7:05 AM, Robert Cummings rob...@interjinn.com wrote: That seems like an abuse of exceptions. But then we're already abusing loops. I just don't think one could say it's the proper way to do it :) i don't have a lot of

Re: [PHP] speaking of control structures...

2009-05-06 Thread Robert Cummings
On Wed, 2009-05-06 at 08:43 -0400, Tom Worster wrote: On 5/6/09 6:56 AM, Marcus Gnaß gona...@gmx.de wrote: Tom Worster wrote: there's a control structure i wish php had: a simple block that you can break out of, e.g. As Maarten pointed out you could use a function. Another

Re: [PHP] speaking of control structures...

2009-05-06 Thread Tom Worster
On 5/5/09 8:55 PM, Clancy clanc...@cybec.com.au wrote: On Tue, 05 May 2009 14:13:23 -0400, rob...@interjinn.com (Robert Cummings) wrote: On Tue, 2009-05-05 at 13:56 -0400, Tom Worster wrote: there's a control structure i wish php had: a simple block that you can ... But PHP 5.3

Re: [PHP] speaking of control structures...

2009-05-06 Thread Per Jessen
Tom Worster wrote: On 5/6/09 6:56 AM, Marcus Gnaß gona...@gmx.de wrote: Tom Worster wrote: there's a control structure i wish php had: a simple block that you can break out of, e.g. As Maarten pointed out you could use a function. Another alternative is to use Exceptions which might be

Re: [PHP] speaking of control structures...

2009-05-06 Thread Tom Worster
On 5/6/09 8:55 AM, Per Jessen p...@computer.org wrote: Shawn McKenzie already posted the right solution - did you miss it? no, per, i didn't. i like do {} while (0) very much. thanks, shawn! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] speaking of control structures...

2009-05-06 Thread Marcus Gnaß
Robert Cummings wrote: On Wed, 2009-05-06 at 12:56 +0200, Marcus Gnaß wrote: Tom Worster wrote: there's a control structure i wish php had: a simple block that you can break out of, e.g. As Maarten pointed out you could use a function. Another alternative is to use Exceptions which might be

Re: [PHP] speaking of control structures...

2009-05-06 Thread Shawn McKenzie
Marcus Gnaß wrote: Robert Cummings wrote: On Wed, 2009-05-06 at 12:56 +0200, Marcus Gnaß wrote: Tom Worster wrote: there's a control structure i wish php had: a simple block that you can break out of, e.g. As Maarten pointed out you could use a function. Another alternative is to use

Re: [PHP] speaking of control structures...

2009-05-06 Thread Robert Cummings
On Wed, 2009-05-06 at 22:23 +0200, Marcus Gnaß wrote: Robert Cummings wrote: On Wed, 2009-05-06 at 12:56 +0200, Marcus Gnaß wrote: Tom Worster wrote: there's a control structure i wish php had: a simple block that you can break out of, e.g. As Maarten pointed out you could use a

Re: [PHP] speaking of control structures...

2009-05-06 Thread Robert Cummings
On Wed, 2009-05-06 at 15:50 -0500, Shawn McKenzie wrote: Marcus Gnaß wrote: Robert Cummings wrote: On Wed, 2009-05-06 at 12:56 +0200, Marcus Gnaß wrote: Tom Worster wrote: there's a control structure i wish php had: a simple block that you can break out of, e.g. As Maarten pointed out

Re: [PHP] speaking of control structures...

2009-05-06 Thread Marcus Gnaß
Robert Cummings wrote: On Wed, 2009-05-06 at 22:23 +0200, Marcus Gnaß wrote: Robert Cummings wrote: On Wed, 2009-05-06 at 12:56 +0200, Marcus Gnaß wrote: Tom Worster wrote: there's a control structure i wish php had: a simple block that you can break out of, e.g. As Maarten pointed out

Re: [PHP] speaking of control structures...

2009-05-06 Thread Nathan Rixham
Robert Cummings wrote: On Wed, 2009-05-06 at 08:41 -0400, Tom Worster wrote: On 5/6/09 7:05 AM, Robert Cummings rob...@interjinn.com wrote: That seems like an abuse of exceptions. But then we're already abusing loops. I just don't think one could say it's the proper way to do it :) i don't

Re: [PHP] speaking of control structures...

2009-05-06 Thread Clancy
On Wed, 06 May 2009 08:54:14 -0400, f...@thefsb.org (Tom Worster) wrote: ... clancy, i can't argue with you. my desired usage of break is really just a cover-up for a goto. i know. it makes no logical sense but i think i'd sooner adopt oop than gotos. my mom taught me to program back in the

[PHP] speaking of control structures...

2009-05-05 Thread Tom Worster
there's a control structure i wish php had: a simple block that you can break out of, e.g. block { if ( condition ) break; blah... blah... if ( another condition ) break; blah... blah... etc... } the block is just like a loop except that it is executed once only.

Re: [PHP] speaking of control structures...

2009-05-05 Thread Robert Cummings
On Tue, 2009-05-05 at 13:56 -0400, Tom Worster wrote: there's a control structure i wish php had: a simple block that you can break out of, e.g. block { if ( condition ) break; blah... blah... if ( another condition ) break; blah... blah... etc... }

Re: [PHP] speaking of control structures...

2009-05-05 Thread Clancy
On Tue, 05 May 2009 14:13:23 -0400, rob...@interjinn.com (Robert Cummings) wrote: On Tue, 2009-05-05 at 13:56 -0400, Tom Worster wrote: there's a control structure i wish php had: a simple block that you can ... But PHP 5.3 introduces goto: ?php header: if( $something ) ...