C Martin Posted September 6, 2011 Share Posted September 6, 2011 I am confused and I know that this is a question that should have been asked a long time ago. > evaluates as Greater Than, >= evaluates as Greater Than or Equal to, < evaluates as Less Than, <= evaluates as Less Than or Equal To. Is this correct, or am I backwards? I seem to be getting reverse values. Sorry if this seems to be a Juvenile question. Clarence Link to comment
apostolakisl Posted September 6, 2011 Share Posted September 6, 2011 Just remember, the alligator eats the bigger number. (Yes, you are correct). Link to comment
C Martin Posted September 6, 2011 Author Share Posted September 6, 2011 Thanks apostolakisl, But is ISY programming backwards? I seem to get reversed results from my evaluations. If Status 'Thermostats / Remote Stat / Remote Thermostat' < 84° (Temperature) Then $sRemote_Stat_temp_alert = 1 Else $sRemote_Stat_temp_alert = 0 How would you evaluate this program? I actually want my variable to evaluate to 1 if the temp is greater than 84. This actually evaluates to 1 when the temp is 84 or even 83 - 84 or less. Clarence Link to comment
oberkc Posted September 6, 2011 Share Posted September 6, 2011 While I have yet to take advantage of the variables, I would evaluate your condition as: Status 'Thermostats / Remote Stat / Remote Thermostat' IS LESS THAN 84° Given this, your program would set your variable to "1" if the teperature is below 84 degrees. This appears to me to be consistent with every math convention that I learned. I actually want my variable to evaluate to 1 if the temp is greater than 84. Given this, I believe it would be more correct to write your condition: Status 'Thermostats / Remote Stat / Remote Thermostat' > 84° Link to comment
C Martin Posted September 6, 2011 Author Share Posted September 6, 2011 Thanks, I guess my mind is working in reverse. I agree with your statement. I guess I needed to see through my fog. Clarence Link to comment
apostolakisl Posted September 6, 2011 Share Posted September 6, 2011 The symbol compares the two things on each side of it. The alligator eats the bigger number For example: 1<2 4>3 So if you wrote if Status 'Thermostats / Remote Stat / Remote Thermostat' < 84° (Temperature) (in plain English you would say, "if the remote thermostat is reading less than 84 degrees") then $sRemote_Stat_temp_alert = 1 else $sRemote_Stat_temp_alert = 0 Your variable would be set to 1 whenever the temp is less than 84 because that is when the if statement is true. Link to comment
C Martin Posted September 6, 2011 Author Share Posted September 6, 2011 apostolakisl, Got it. I was thinking in reverse. Thanks, Clarence Link to comment
Recommended Posts