x AND y OR z interpretation

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

x AND y OR z interpretation

Postby js2002 » Mon Nov 02, 2009 7:32 am

Went to SD in 3 Bet Pot:

WTSD AND face3Bet OR 3bet
x AND y OR z

What gets interpreted first? If I do the AND first:
011=1 -> 0 OR 1 = 1

If I do the OR first:
011=0

Do bracket ensure things here? f.e. x AND (y OR z) says to do the OR first...
js2002
 
Posts: 1502
Joined: Fri Feb 15, 2008 5:44 am
Location: Germany

Re: x AND y OR z interpretation

Postby kraada » Mon Nov 02, 2009 9:28 am

A and B or C if A is false and B and C are both true will yield a true result.

However, parentheses certainly ensure things here - if you wanted A and (B or C) that would make "B or C" evaluated first, then the result is used in conjunction with AND and A. When in doubt, putting things in parenthesis will definitely be the way to go.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: x AND y OR z interpretation

Postby js2002 » Mon Nov 02, 2009 10:44 am

Thx, I had to check all my stats now ;) think they are ok, overflew em....
js2002
 
Posts: 1502
Joined: Fri Feb 15, 2008 5:44 am
Location: Germany


Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 0 guests