in reply to Re^2: Checking the Ascendency/Descendency of Numeric Array of Any Size
in thread Checking the Ascendency/Descendency of Numeric Array of Any Size

0 is false, undef is also false, but 0 is not undef. is_asc(-2,-1,0) returns 0, not undef.
  • Comment on Re^3: Checking the Ascendency/Descendency of Numeric Array of Any Size

Replies are listed 'Best First'.
Re^4: Checking the Ascendency/Descendency of Numeric Array of Any Size
by Eimi Metamorphoumai (Deacon) on Mar 23, 2007 at 18:04 UTC
    But if you use it as was suggested (with a ternop ? 1 : 0), then it still evaluates false. If you're going to write a function, at least put the defined test into the function.
    A reply falls below the community's threshold of quality. You may see it by logging in.