[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] need help
From: |
Gunnar Farneback |
Subject: |
Re: [gnugo-devel] need help |
Date: |
Wed, 04 Feb 2004 22:48:15 +0100 |
User-agent: |
EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode) |
Max wrote:
> -about the 2 lines of the expression
> ; expression A
> ; expression B
> i suppose the pattern matcher accepts if A and B are true ..
The two lines are simply concatenated into a single expression.
> -i believe C uses && for logical AND, || for logical OR.
> But i'm not sure .
> Is it right ?
Yes. I think the following is sufficient to read the expressions in
the pattern databases:
&& logical AND
|| logical OR
! logical NOT
It may also help to know that 0 is FALSE, anything non-zero is TRUE
and the result of a logical expression is 0 or 1.
There are also some rules about precedence in C. A simplification of
the most important ones in this context can be found in the table
below, ordered in decreasing priority.
logical NOT
arithmetic operators (* / + -)
relational operators (> >= < <= == !=)
logical binary operators (&& ||)
/Gunnar