RFC 25 (v1): Multiway comparisons

and now snip from the Icon language :
http://www.cs.arizona.edu/icon/docs/ipd266.htm

<snip>
2.1 Conditional Expressions
In Icon there are conditional expressions that may succeed and produce a
result, or may fail and not produce any result. An example is the comparison
operation
i > j
which succeeds (and produces the value of j) provided that the value of i is
greater than the value of j, but fails otherwise. Similarly,
i > j > k
succeeds if the value of j is between i and k.

The success or failure of conditional operations is used instead of Boolean
values to drive control structures in Icon. An example is
if i > j then k := i else k := j
which assigns the value of i to k if the value of i is greater than the
value of j, but assigns the value of j to k otherwise.
</snip>

I think the idea of leaving the value "j" in "i > j" is cool...
=====
iVAN
[EMAIL PROTECTED]
=====

Reply via email to