What I'd really like to see in an if-statement...
Bjorn Engsig
bengsig at oracle.nl
Mon Aug 7 19:59:17 AEST 1989
Article <14521 at bfmny0.UUCP> by tneff at bfmny0.UUCP (Tom Neff) says:
| val1 < x < val2
|
|What's wished for is a triadic comparison operator ...
|
|... and parsing would be a nightmare.
As an example, have a look at the database language SQL, where you can write
<expr1> <= <expr2> AND <expr2> <= <expr3>
or
<expr2> BETWEEN <expr1> AND <expr3>
The two semantically equal (no side effects) have to be syntactically different
for the parser to resolve it.
--
Bjorn Engsig, ORACLE Europe \ / "Hofstadter's Law: It always takes
Path: mcvax!orcenl!bengsig X longer than you expect, even if you
Domain: bengsig at oracle.nl / \ take into account Hofstadter's Law"
More information about the Comp.lang.c
mailing list