Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #4056 > unrolled thread
| Started by | oldyork90 <oldyork90@yahoo.com> |
|---|---|
| First post | 2011-12-12 12:41 -0800 |
| Last post | 2011-12-14 14:02 +0100 |
| Articles | 7 — 5 participants |
Back to article view | Back to comp.lang.php
a perl guy question; next label? continue label? oldyork90 <oldyork90@yahoo.com> - 2011-12-12 12:41 -0800
Re: a perl guy question; next label? continue label? "Peter H. Coffin" <hellsop@ninehells.com> - 2011-12-12 15:33 -0600
Re: a perl guy question; next label? continue label? oldyork90 <oldyork90@yahoo.com> - 2011-12-12 17:38 -0800
Re: a perl guy question; next label? continue label? "Peter H. Coffin" <hellsop@ninehells.com> - 2011-12-13 07:26 -0600
Re: a perl guy question; next label? continue label? Tim Streater <timstreater@greenbee.net> - 2011-12-13 14:57 +0000
Re: a perl guy question; next label? continue label? The Natural Philosopher <tnp@invalid.invalid> - 2011-12-13 19:44 +0000
Re: a perl guy question; next label? continue label? Erwin Moller <Since_humans_read_this_I_am_spammed_too_much@spamyourself.com> - 2011-12-14 14:02 +0100
| From | oldyork90 <oldyork90@yahoo.com> |
|---|---|
| Date | 2011-12-12 12:41 -0800 |
| Subject | a perl guy question; next label? continue label? |
| Message-ID | <daf31c1e-2cbb-4141-a2a6-b85806c14005@q9g2000yqe.googlegroups.com> |
It doesn't appear the php has a continue label construct as in (perl)
:outer for(.......
:inner for (....
if (...) {
next outer;
Is that correct?
[toc] | [next] | [standalone]
| From | "Peter H. Coffin" <hellsop@ninehells.com> |
|---|---|
| Date | 2011-12-12 15:33 -0600 |
| Message-ID | <slrnjecsoc.51n.hellsop@nibelheim.ninehells.com> |
| In reply to | #4056 |
On Mon, 12 Dec 2011 12:41:32 -0800 (PST), oldyork90 wrote:
> It doesn't appear the php has a continue label construct as in (perl)
>
>:outer for(.......
> :inner for (....
> if (...) {
> next outer;
>
> Is that correct?
It does have, sort of. It is, shockingly, called "continue".
PHP-wise, the above would be
for (...) {
for (...) {
if (...) {
continue 2;
}
// This part is skipped by the continue 2 (or continue 1, 0
// or continue all by itself).
}
// This part is ALSO skipped by the continue 2 above, but would
// execute if continue 1, 0, or continue alone were used.
}
--
Whenever you look at a beautiful woman,
always remember that somewhere, someone is tired of her.
[toc] | [prev] | [next] | [standalone]
| From | oldyork90 <oldyork90@yahoo.com> |
|---|---|
| Date | 2011-12-12 17:38 -0800 |
| Subject | Re: a perl guy question; next label? continue label? |
| Message-ID | <48a7ff28-df37-4214-a137-2a68b2cded75@p14g2000yqp.googlegroups.com> |
| In reply to | #4057 |
On Dec 12, 3:33 pm, "Peter H. Coffin" <hell...@ninehells.com> wrote:
> On Mon, 12 Dec 2011 12:41:32 -0800 (PST), oldyork90 wrote:
> > It doesn't appear the php has a continue label construct as in (perl)
>
> >:outer for(.......
> > :inner for (....
> > if (...) {
> > next outer;
>
> > Is that correct?
>
> It does have, sort of. It is, shockingly, called "continue".
>
> PHP-wise, the above would be
>
> for (...) {
> for (...) {
> if (...) {
> continue 2;
> }
> // This part is skipped by the continue 2 (or continue 1, 0
> // or continue all by itself).
> }
> // This part is ALSO skipped by the continue 2 above, but would
> // execute if continue 1, 0, or continue alone were used.
>
> }
>
> --
> Whenever you look at a beautiful woman,
> always remember that somewhere, someone is tired of her.
Yah, I saw that. I wondering about the label part of it. (array ==
@ .. what is this strange language :-)
[toc] | [prev] | [next] | [standalone]
| From | "Peter H. Coffin" <hellsop@ninehells.com> |
|---|---|
| Date | 2011-12-13 07:26 -0600 |
| Subject | Re: a perl guy question; next label? continue label? |
| Message-ID | <slrnjeekjp.51n.hellsop@nibelheim.ninehells.com> |
| In reply to | #4059 |
On Mon, 12 Dec 2011 17:38:33 -0800 (PST), oldyork90 wrote:
> Yah, I saw that. I wondering about the label part of it. (array ==
> @ .. what is this strange language :-)
Nope, no labels. Maybe someday. Shifting from perl to PHP is learning
that you can still do pretty much everthing you could before, just in
the dumbest way you'd be able to do it in perl. The only saving virtue
is that so much stuff comes rolled into the main distributions of PHP
that no one has ever bothered to propose something like CPAN without a
"Haha! Just kidding!" at the end.
--
74. When I create a multimedia presentation of my plan designed so that
my five-year-old advisor can easily understand the details, I will
not label the disk "Project Overlord" and leave it lying on top of
my desk. --Peter Anspach's list of things to do as an Evil Overlord
[toc] | [prev] | [next] | [standalone]
| From | Tim Streater <timstreater@greenbee.net> |
|---|---|
| Date | 2011-12-13 14:57 +0000 |
| Subject | Re: a perl guy question; next label? continue label? |
| Message-ID | <timstreater-5BFE59.14573213122011@news.individual.net> |
| In reply to | #4062 |
In article <slrnjeekjp.51n.hellsop@nibelheim.ninehells.com>, "Peter H. Coffin" <hellsop@ninehells.com> wrote: > On Mon, 12 Dec 2011 17:38:33 -0800 (PST), oldyork90 wrote: > > Yah, I saw that. I wondering about the label part of it. (array == > > @ .. what is this strange language :-) > > Nope, no labels. Maybe someday. Shifting from perl to PHP is learning > that you can still do pretty much everthing you could before, just in > the dumbest way you'd be able to do it in perl. The easiest way, you mean. What used to irritate me about perl was precisely that there were 1000 ways to do anything - so you had to know them all. And the doccy always implied that the more esoteric you made your code, the more Terribly Clever (TM) you were. I once dipped into the perl ng to ask a question about parameter passing. But they were all too busy being Terribly Clever (TM) to give me a civil answer. So fuck 'em. -- Tim "That excessive bail ought not to be required, nor excessive fines imposed, nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
[toc] | [prev] | [next] | [standalone]
| From | The Natural Philosopher <tnp@invalid.invalid> |
|---|---|
| Date | 2011-12-13 19:44 +0000 |
| Subject | Re: a perl guy question; next label? continue label? |
| Message-ID | <jc89uv$4jm$3@news.albasani.net> |
| In reply to | #4063 |
Tim Streater wrote: > In article <slrnjeekjp.51n.hellsop@nibelheim.ninehells.com>, > "Peter H. Coffin" <hellsop@ninehells.com> wrote: > >> On Mon, 12 Dec 2011 17:38:33 -0800 (PST), oldyork90 wrote: >> > Yah, I saw that. I wondering about the label part of it. (array == >> > @ .. what is this strange language :-) >> >> Nope, no labels. Maybe someday. Shifting from perl to PHP is learning >> that you can still do pretty much everthing you could before, just in >> the dumbest way you'd be able to do it in perl. > > The easiest way, you mean. What used to irritate me about perl was > precisely that there were 1000 ways to do anything - so you had to know > them all. And the doccy always implied that the more esoteric you made > your code, the more Terribly Clever (TM) you were. > > I once dipped into the perl ng to ask a question about parameter > passing. But they were all too busy being Terribly Clever (TM) to give > me a civil answer. So fuck 'em. > In general pretty much my opinion of PERL gurus too. Penis Extending Rectalists Langauge
[toc] | [prev] | [next] | [standalone]
| From | Erwin Moller <Since_humans_read_this_I_am_spammed_too_much@spamyourself.com> |
|---|---|
| Date | 2011-12-14 14:02 +0100 |
| Subject | Re: a perl guy question; next label? continue label? |
| Message-ID | <4ee89e52$0$6860$e4fe514c@news2.news.xs4all.nl> |
| In reply to | #4064 |
On 12/13/2011 8:44 PM, The Natural Philosopher wrote: > Tim Streater wrote: >> In article <slrnjeekjp.51n.hellsop@nibelheim.ninehells.com>, >> "Peter H. Coffin" <hellsop@ninehells.com> wrote: >> >>> On Mon, 12 Dec 2011 17:38:33 -0800 (PST), oldyork90 wrote: >>> > Yah, I saw that. I wondering about the label part of it. (array == >>> > @ .. what is this strange language :-) >>> >>> Nope, no labels. Maybe someday. Shifting from perl to PHP is learning >>> that you can still do pretty much everthing you could before, just in >>> the dumbest way you'd be able to do it in perl. >> >> The easiest way, you mean. What used to irritate me about perl was >> precisely that there were 1000 ways to do anything - so you had to >> know them all. And the doccy always implied that the more esoteric you >> made your code, the more Terribly Clever (TM) you were. >> >> I once dipped into the perl ng to ask a question about parameter >> passing. But they were all too busy being Terribly Clever (TM) to give >> me a civil answer. So fuck 'em. >> > In general pretty much my opinion of PERL gurus too. > > Penis Extending Rectalists Langauge Hmm, I have had good experience with perl newsgroups in the past. But that was like 800 years ago. :-) Maybe the nice chaps all moved to PHP/Python and the likes and the ones that were in need of a penis extension stayed behind. ;-) Regards, Erwin Moller -- "That which can be asserted without evidence, can be dismissed without evidence." -- Christopher Hitchens
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.php
csiph-web