Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Agent, Actions, Rules & Automation >> Clarification request for |=
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1428773577

Message started by Barbara Snyder on Apr 11th, 2015, 1:32pm

Title: Clarification request for |=
Post by Barbara Snyder on Apr 11th, 2015, 1:32pm

Hi --

I'm trying to understand the conditional statements info.

I see:
( A &= B )
Reads: result is true if condition A is currently true and, if so, if condition B is also true.
Thus, if condition A is false, condition B is not checked and the overall result is false. Thus in some cases only condition A is evaluated.

( A | B )
Reads: if condition A OR condition B is true, then this compound query is true.

So far so good.

( A |= B )
Reads: result is true if condition A is currently true or, if so if condition B is true.
Thus, if condition A is false, condition B is not checked and the overall result is false. Thus in some cases only condition A is evaluated.

This is where I get lost. If I'm reading correctly, if A is true, ( A |= B ) returns true no matter what the value of B, and if A is false, it returns false no matter what the value of B. So how is

( A |= B )

different from a simple

(A)

?

Thanks -- Barbara


Title: Re: Clarification request for |=
Post by Mark Bernstein on Apr 11th, 2015, 3:13pm

None of these are used in queries.

The action
    $A |= $B
is shorthand for
    $A = $A | $B;

Similarly
    $A &= &B;
is shorthand for
    $A = $A & $B;

And
    $MyNum += 6
is shorthand for
    $MyNum = $MyNum + 6;

Only the latter is in widespread use.

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.