Pages: [1]   Go Down
Author Topic: More than one OR statement?  (Read 305 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)
Online Online
Faraday Member
**
Karma: 118
Posts: 4335
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.

Johannesburg. UTC+2
Offline Offline
Faraday Member
**
Karma: 105
Posts: 4691
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

The Elders of the Internet know who I am
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

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)
Online Online
Faraday Member
**
Karma: 118
Posts: 4335
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: