Re: suggested parentheses around assignment used as truth value

From: Xual (xual@danathara.dhs.org)
Date: 12/21/99


On Tue, 21 Dec 1999, Michael Gallagher wrote:

> I have about 5 of these warnings when i compile in linux. I thought
> i knew what the problem was, that some if statement was missing
> a set of brackets (), but i can't seem to fix the little buggers.

Sounds like you are trying you use the assignment operator ( = ) in place of
the equality operator ( == ), ie:

if (x = y)
  ...

instead of:

if (x == y)
  ...


-- Xual

"Don't smoke the cheap stuff!!!"
        -= Cat's Dad =-


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST