PDJ - Thank you for the thanks.
Nice! Never thought of that. Looking at it made me think of this also
If Condition A
Variable set %test ~ true
EndIF
If Condition B
Variable set %test ~ true
EndIF
If %test ~ true
Codition OR acheived
Else
Conditon OR not acheived
EndIF
That's a good alternative. I'm sure you assumed @test was initialized as %false.
My preference is still to stick with 1's and 0's.
Often times you'll need to store the intermediate condition test as a logical variable anyway. For example when a condition is tested at one time and the result used a a later time. Or maybe the result needs to be used in multiple places. So when you need to create a logical variable, I suggest to just code it as 1 or 0 to make it easier whenever you want to use that logical variable in a complicated expression later.
Example:
Let's say you want to OR not just two conditions but three and your logical variables are stored as 1's or 0's
You can simply use if if(FlagA + FlagB + FlagC) > 0.
More Complicated Example
Let's say you want the expression: If (A OR B OR C) AND D AND F AND NOT(G)
If all the logical variables are defined as 1's and 0's, you can do it as follows:
if(FlagA + FlagB + FlagC)*FlagD*FlagE*(ABS(FlagG-1)) > 0.
Note that
AND translates seamlessly to *
NOT translates seamlesslyto ABS(Flag - 1)
OR tranlslates to (Flag + Flag + Flag...) > 0
Note that the AND and NOT can be easily embedded in an expression without regard to where the expression is used (could be subexpression of bigger expression). The OR requires use of the comparison (>) operator which is only available within an IF statement argument. I'm trying to think if there is another way to do the OR using only the Tasker math operators (not the >). I guess if you needed we could use the following to give a logical OR:
ceil((FlagA + FlagB + FlagC...) / 100)