Problem with ()?():() as ending test in for-loop
Peter da Silva
peter at ficc.uu.net
Sat May 27 05:48:24 AEST 1989
In ANSI 'C' there's a difference between ()?():() and (()&&())||(~()&&()).
The type of the result differs if one of the resulting expressions is
(void *):
(()&&(char *))||(~()||(void *)) -- may be char *, will never be void *.
()?(char *):(void *) -- will be void *
See comp.std.c for exhaustive debate on the subject.
--
Peter da Silva, Xenix Support, Ferranti International Controls Corporation.
Business: uunet.uu.net!ficc!peter, peter at ficc.uu.net, +1 713 274 5180.
Personal: ...!texbell!sugar!peter, peter at sugar.hackercorp.com.
More information about the Comp.lang.c
mailing list