Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!pilchuck!dataio!gtenmc!csp From: csp@gtenmc.UUCP Newsgroups: comp.lang.c Subject: ? and = do not go hand-in-hand Message-ID: <1100@gtenmc.UUCP> Date: 30 Mar 91 00:51:35 GMT Reply-To: csp@gtenmc.UUCP () Organization: GTE Telecom, Inc. Bothell, WA Lines: 20 To someone with a macro problem :- The problem is not with the 'macro'. funct(a,b,c,d) float a,b,c,d; { return( d == 0 ? a = 0 , b = c : ( a = c / d , b = c - a * d )); ^ This bracket is nescessary otherwise the scope of the '?' operator is upto '=' after the ':' and not including it. Since assignment has a lower precedence than the '?' operator. In short the attempt is to assign a value to a value which is senseless. } C S Palkar --