What I'd really like to see in an if-statement...
Tom Neff
tneff at bfmny0.UUCP
Tue Aug 8 02:10:47 AEST 1989
I suppose I might as well point out that if speed is not crucial,
you could always code a C function to do the triadic compare:
if (triadc(min, '<', thisval, '<=', max)) ...
note using char for the two "operators" as above only works if type
int will accomodate two characters, which is usually but not universally
true. You could also define special symbols for <= and >= and thus
express them in one character, or you could use string pointers or
enum constants like
if (triadc(min, LESS_THAN, thisval, LESS_OR_EQUAL, max)) ...
--
"We walked on the moon -- (( Tom Neff
you be polite" )) tneff at bfmny0.UU.NET
More information about the Comp.lang.c
mailing list