What's wrong with this line of code...

George Handley ghandley at kc.rr.com
Mon May 9 16:42:29 EDT 2016


Good afternoon Tom, and thank you for the rehash. I always thought I had command over these constructs, but I guess this was the first time I tried to use it on two time periods that would never resolve to true. The lion head code is now working fine, and just needs a little tweaking to minimise when it doesn’t have to be off due to the wind.

Best wishes,

George




> On May 9, 2016, at 1:34 PM, Thomas Arman <tarman at me.com> wrote:
> 
> George,
> 
> The easy way to understand the logic below is to know that EACH of the comparisons returns either TRUE or FALSE.
> 
> If they are joined with an AND, then they both must be TRUE for the “if” code to execute.
> If either (or both) are FALSE, then the “else” executes.
> 
> You can usually just read them OUT LOUD to yourself and determine what will happen.
> 
> For example:
> If 
> 	the time now is greater than or equal to One AM  <— This is either true or false
> AND 
> 	the time now is less than or equal to Nine AM <— This also is either true or false
> then 
> 	do “something”  (only if “true” AND “true”, i.e. both “true” because it is now sometime between 1:00—>9:00 AM)
> else (i.e., otherwise) 
> 	do the "other stuff”.  (if not BOTH “true”)
> 
> Tom
> 
> PS: If they are joined by an OR, then if either (or both) are TRUE, the “if” code to executes.
> If BOTH are FALSE (i.e., neither is TRUE), then the “else” executes.
> 
> 
>> 
>> if (current date) ≥ date ("1:00am") and (current date) ≤ date ("9:00am") then
>> 	— Do this if BOTH clauses are TRUE
>> else
>> 	— Do this if EITHER (or both) Clause is FALSE
>> end if
> 
> _______________________________________________
> XTensionList mailing list
> XTensionList at machomeautomation.com
> http://mail.machomeautomation.com/mailman/listinfo/xtensionlist

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.machomeautomation.com/pipermail/xtensionlist/attachments/20160509/3c2a9184/attachment.html>


More information about the XTensionList mailing list