Go Down

Topic: Boolean operators (Read 207 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