Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!nuchat!sugar!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.lang.c Subject: Re: Problem with ()?():() as ending test in for-loop Message-ID: <4326@ficc.uu.net> Date: 26 May 89 19:48:24 GMT References: <1200@liszt.kulesat.uucp> <17722@mimsy.UUCP> <732@sdrc.UUCP> Organization: Xenix Support Lines: 13 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@ficc.uu.net, +1 713 274 5180. Personal: ...!texbell!sugar!peter, peter@sugar.hackercorp.com.