Go Down

Topic: More than one OR statement? (Read 579 times) previous topic - next topic

StuntMonkeh

How do I add more than one OR statement?

I currently have;
Code: [Select]
if(dT > 0.2 || dT < -0.2) {


how do I add another OR statement to it?

I want to add x=360

UKHeliBob

Code: [Select]
if(dT > 0.2 || dT < -0.2 || x = 360)
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

JimboZA

Bzzzzzzzzzzt... shouldn't that be x == 360?
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

StuntMonkeh

Ah thats where I was going wrong.  I too was only using one '=' not two

Thanks for your help  :)

UKHeliBob

BONG !

Yes, of course it should.  In my defence he did say that he wanted x=360 and that is what he got !
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Go Up