in reply to Comparison misses a true in *some* cases

AFAIK is the order of evaluation not predictable, that is in
$left_idx++ if $store->[$left_idx] < $start;
$left_idx might be increased before or after the if.

Replies are listed 'Best First'.
Re: Re: Comparison misses a true in *some* cases
by japhy (Canon) on Apr 06, 2001 at 20:58 UTC
    No, I'm afraid you're wrong. That would be a terribly bad bug. In an if statement, the condition ($store->[$left_idx] < $start) MUST be evaluated before the execution of that which DEPENDS on the condition ($left_idx++).

    japhy -- Perl and Regex Hacker
Re: Re: Comparison misses a true in *some* cases
by jeroenes (Priest) on Apr 06, 2001 at 19:31 UTC
    Well, I never had problems with that before. But even if this is the case, that wouldn't explain the behavior nor the workaround.

    Jeroen
    "We are not alone"(FZ)