Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.perl.misc > #8794
| From | Charles DeRykus <derykus@gmail.com> |
|---|---|
| Newsgroups | comp.lang.perl.misc |
| Subject | Re: names, values, boxes and microchips |
| Date | 2013-07-21 16:29 -0700 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <kshqtl$u0r$1@speranza.aioe.org> (permalink) |
| References | <87a9lmi67s.fsf@sapphire.mobileactivedefense.com> <87r4es5idv.fsf@sapphire.mobileactivedefense.com> <fogtba-pi21.ln1@anubis.morrow.me.uk> <87r4er1yh9.fsf@sapphire.mobileactivedefense.com> <sn1uba-8851.ln1@anubis.morrow.me.uk> |
On 7/21/2013 2:51 PM, Ben Morrow wrote:
>
> Quoth Rainer Weikusat <rweikusat@mssgmbh.com>:
>> Ben Morrow <ben@morrow.me.uk> writes:
> ...
> Let's look at the main loop from your original post:
>
> LOOP: {
> ($rc) = $in_item->net_compare($filter_item);
>
> p_alloc('in %s, filter %s, rc %u',
> $in_item, $filter_item, $rc);
>
> given ($rc) {
> when (R_AFTER) {
> push(@out, $in_item);
> &$step_in;
> }
>
> when ([R_BEFORE, R_SUB]) {
> &$step_filter;
> }
>
> when ([R_SAME, R_SUPER]) {
> p_alloc('%s: dropping %s (%s)', __func__,
> $in_item, $filter_item);
>
> &$step_in;
> }
> }
>
> redo;
> }
>
> When does it terminate? How does it make progress? It's not even
> immediately clear it's a *loop*: while (1) or for (;;) are the
> conventional idioms.
> ...
Even a more expressive 'do' might help a dizzy brain:
do {
....
}
until $in_pos == @$in or $filter_pos == @$filter;
--
Charles DeRykus
Back to comp.lang.perl.misc | Previous | Next — Previous in thread | Next in thread | Find similar
names, values, boxes and microchips Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-16 21:45 +0100
Re: names, values, boxes and microchips Ben Morrow <ben@morrow.me.uk> - 2013-07-19 17:07 +0100
Re: names, values, boxes and microchips Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-19 17:38 +0100
Re: names, values, boxes and microchips Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-19 19:28 +0100
Re: names, values, boxes and microchips Ben Morrow <ben@morrow.me.uk> - 2013-07-20 00:11 +0100
Re: names, values, boxes and microchips Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-20 15:02 +0100
Re: names, values, boxes and microchips Ben Morrow <ben@morrow.me.uk> - 2013-07-20 16:45 +0100
Re: names, values, boxes and microchips Rainer Weikusat <rw@sapphire.mobileactivedefense.com> - 2013-07-21 11:15 +0100
Re: names, values, boxes and microchips gamo@telecable.es - 2013-07-21 12:47 +0000
Re: names, values, boxes and microchips Shmuel (Seymour J.) Metz <spamtrap@library.lspace.org.invalid> - 2013-07-23 07:14 -0400
Re: names, values, boxes and microchips gamo@telecable.es - 2013-07-23 20:43 +0000
Re: names, values, boxes and microchips Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-24 11:23 +0100
Re: names, values, boxes and microchips Ben Morrow <ben@morrow.me.uk> - 2013-07-23 23:10 +0100
Re: names, values, boxes and microchips Ben Morrow <ben@morrow.me.uk> - 2013-07-21 18:01 +0100
Re: names, values, boxes and microchips Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-21 20:53 +0100
Re: names, values, boxes and microchips Ben Morrow <ben@morrow.me.uk> - 2013-07-21 22:51 +0100
Re: names, values, boxes and microchips Charles DeRykus <derykus@gmail.com> - 2013-07-21 16:29 -0700
Re: names, values, boxes and microchips Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-22 01:20 +0100
Re: names, values, boxes and microchips Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-22 01:06 +0100
[OT] naming conventions Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-22 10:35 +0100
csiph-web