develooper Front page | perl.perl5.porters | Postings from March 2020

Re: chained comparisons

Thread Previous | Thread Next
From:
David Nicol
Date:
March 6, 2020 19:22
Subject:
Re: chained comparisons
Message ID:
CAFwScO-yNZ4vq3N67fDgE9PJiw6j4rwryaHzuOCaiYpCHM2MGg@mail.gmail.com
Questions without doing any research aside from skimming this thread:

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?

also can the with and without equals versions (lt, le), (<, <=), (gt, ge),
and (>, >=) chain together or must it be the same variant all the way
through?

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About