Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 7/25/2005 Posts: 7
|
I created a PCF for TSV cross below 0 as:
TSV24 < 0 AND TSV24.1 > 0 AND TSV24.2 > 0 AND TSV24.3 > 0 TSV24.4 > 0 AND TSV24.5 > 0
When I test it for LM, the test shows the following result:
90.47 < 0.00 AND 124.80 > 0.00 AND 155.99 > 0.00 AND 112.44 > 0.00 97.03 > 0.00 AND 95.76 > 0.00
This is evaulating to "True".
But since 90.47 < 0.00 is False, it really should evaluate to "False".
Is there an issue with operator precedence? In normal algebra, < and > has a higher precedence than logical operator AND which has a higher precedence than OR, and so on.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I can reproduce the issue. I'm moving this topic to verified bugs.
It seems you can work around this by changing the order of the Personal Criteria Formula to:
TSV24.1 > 0 AND TSV24.2 > 0 AND TSV24.3 > 0 AND TSV24.4 > 0 AND TSV24.5 > 0 AND TSV24 < 0
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 7/25/2005 Posts: 7
|
QUOTE (Bruce_L) I can reproduce the issue. I'm moving this topic to verified bugs.
It seems you can work around this by changing the order of the Personal Criteria Formula to:
TSV24.1 > 0 AND TSV24.2 > 0 AND TSV24.3 > 0 TSV24.4 > 0 AND TSV24.5 > 0 AND TSV24 < 0
Just one word of caution... I had left out an AND operator but the problem persists after making this correction also.
Another thing is that if you add () around the < expression terms, it seems to fix the problem.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
It does not persist for me after adding in the missing AND.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 1/1/2005 Posts: 2,645
|
QUOTE (karanjit) Is there an issue with operator precedence? In normal algebra, < and > has a higher precedence than logical operator AND which has a higher precedence than OR, and so on.
A word of caution. In TC2005, OR has a higher precedence than AND which is not normal.
Thanks, Jim Murphy
|
|
Guest-1 |