Pages: [1]   Go Down
Author Topic: More than one OR statement?  (Read 217 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How do I add more than one OR statement?

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

how do I add another OR statement to it?

I want to add x=360
Logged

East Anglia (UK)
Offline Offline
Faraday Member
**
Karma: 90
Posts: 3526
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
if(dT > 0.2 || dT < -0.2 || x = 360)
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Offline Offline
Faraday Member
**
Karma: 60
Posts: 3242
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Bzzzzzzzzzzt... shouldn't that be x == 360?
Logged

Retired from Arduino.
PMs are set to ignore all.

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Thanks for your help  smiley
Logged

East Anglia (UK)
Offline Offline
Faraday Member
**
Karma: 90
Posts: 3526
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

BONG !

Yes, of course it should.  In my defence he did say that he wanted x=360 and that is what he got !
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Pages: [1]   Go Up
Jump to: