Re: [NEWBIE][CODE] invalid_race/invalid_class

From: Jared Noble (jnoble@inreach.com)
Date: 03/06/01


> All the conditions must be enclosed in ().

I appreciate that two of you took the time to respond, but you both
neglected to actually read my email.  My first attempt did include the extra
parentheses. Here is a quote from my original mail.

---------------- snip snip -------------------
The only modification I had made was not following that particular list of
races. Anyhow, upon compile the following error was thrown at me.

gcc -g -O2 -Wall  -c class.c
class.c: In function `invalid_race':
class.c:2270: warning: suggest parentheses around && within ||
class.c:2270: parse error before `return'
*** Error code 1

So, I tooled around a bit hoping to figure it out without needed to write
this here email. Basically, I removed the extra parentheses. That got rid of
the warning - suggestion for added parantheses around && but the parse error
still remains. I've gone through and typed in the text by hand and still
there is parse error. I cannot figure out what's going on.
---------------- snip snip -------------------

It's kind of weird. With the extra parentheses, I get a warning to add more.
Without them all I have to deal with is the parse error. But I simply cannot
figure out what the problem is. Figured it was spacing again, my compiler is
a finicky <explative>.

Is there some other way to structure this block of code?

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/04/01 PST