i’m new in arduino and very new in forum.
i’m following some Tutorials, and i sometime see:
if ((var==HIGH) and (goofy==0))
but sometime i see something like that (i dont remember exact code):
if (var==HIGH && goofy==0)
what is difference between “and” and “&&” ? why do i need 2 (( )) in the first example?
i tried to look here: http://www.arduino.cc/en/Reference/Boolean
but i cannot find AND page, so i cannot compare
C++ defines keywords to act as aliases for a number of symbols that function as operators: and (&&), bitand (&), and_eq (&=), or (||), bitor (|), or_eq (|=), xor (^), xor_eq (^=), not (!), not_eq (!=), compl (~).
Evidently this originates from the concern that on some international keyboards, some of the usual symbols used for logical operators may not be available.
Reminds me of my FORTRAN days: if ( i .eq. 0 .and. j .gt. 1) ...