Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Clarification request for |= (Read 1028 times)
Barbara Snyder
Full Member
*
Offline



Posts: 80

Clarification request for |=
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

Back to top
 
 
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Clarification request for |=
Reply #1 - 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.
Back to top
 
 
WWW   IP Logged
Pages: 1
Send Topic Print