Front page | perl.perl5.porters |
Postings from March 2020
Re: chained comparisons
Thread Previous
|
Thread Next
From:
David Nicol
Date:
March 6, 2020 19:56
Subject:
Re: chained comparisons
Message ID:
CAFwScO8ji-AO3gNAehnZN+Ms0uaA6V_fkN5YD3GWfv8K9Xi9Cw@mail.gmail.com
awesome possum!
On Fri, Mar 6, 2020 at 1:50 PM Zefram via perl5-porters <
perl5-porters@perl.org> wrote:
> David Nicol wrote:
> >does it short-circuit as soon as possible starting from the left, on
> >failure? that is, when A is greater than B, C<< A <= B <= C >> won't
> >evaluate C?
>
> Yes, it does short-circuit in that case, and won't evaluate C.
>
> >also can the with and without equals versions (lt, le), (<, <=), (gt, ge),
> >and (>, >=) chain together
>
> Yes, all of those operators chain with each other.
>
> -zefram
>
--
"I know Darth Vader's really got you annoyed
but remember if you kill him then you'll be unemployed" -- Alfred M.
Yankovic
Thread Previous
|
Thread Next