Go Down

Topic: Boolean operators (Read 218 times) previous topic - next topic

bmax1201

can you do this:

Code: [Select]
if( x > 0 && y > 0 && z == 0 )

Ive done this before:

Code: [Select]
if( x > 0 && y > 0 )

Is it possible to use multiple && in an IF statement?

Nick Gammon

Yes, but why ask on a forum? Try it and see.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy