in reply to Re^2: assigning the maximum of two numbers
in thread assigning the maximum of two numbers
could be written as the following in BASIC (knowing that false is 0 and true is -1):$a = $i > $j ? 6 : 10;
just as it could be written as the following in Perl (knowing that false is 0 and true is 1):LET a = (i > j) * 4 + 10;
$a = ($i > $j) * -4 + 10;
|
|---|