Go Down

Topic: Boolean operators (Read 194 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.
http://www.gammon.com.au/electronics

Go Up