in reply to Re: alternatives to if and series of elsif
in thread alternatives to if and series of elsif
Your code (assuming $points is true) reduces the conditional test to a test on the min of the $Max or $new against $quota. I'm trying to understand why it's sufficient without also testing for points against some default value:return ( $points && min( $Max, $new ) > $quota ) ? $new : $Base;
if ($points > 18000 && $quota < 24) { return 24; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: alternatives to if and series of elsif
by tlm (Prior) on Jul 03, 2005 at 13:38 UTC | |
by kiat (Vicar) on Jul 03, 2005 at 15:56 UTC |