Hi John,
On 4/9/07, John Samperi <samperi@ampertronics.com.au> wrote:
> At 08:13 PM 9/04/2007, you wrote:
> >(1<CS11) | (0<CS10); // Missing '<' !!!!
>
> Didn't the compiler complain? Or are both << and < acceptable?
Both are acceptable.
(a < b) is an expression that yields 1 if a is < b and 0 otherwise.
It's just as valid to do:
int x = a < b;
if ( x )
{
...blah...
}
as it is to do:
if ( a < b )
{
...blah...
}
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/Message
Re: [AVR-Chat] Solved! Re: ATmega 168 Timer 1 mode 14, fast PWM, problem
2007-04-09 by Dave Hylands