Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

TSV cross below 0 Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
karanjit
Posted : Wednesday, February 1, 2006 10:10:56 AM
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.
Bruce_L
Posted : Wednesday, February 1, 2006 10:30:57 AM


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
karanjit
Posted : Wednesday, February 1, 2006 10:47:23 AM
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 &gt; 0 AND TSV24.2 &gt; 0 AND TSV24.3 &gt; 0 TSV24.4 &gt; 0 AND TSV24.5 &gt; 0 AND TSV24 &lt; 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.
Bruce_L
Posted : Wednesday, February 1, 2006 10:58:58 AM


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
bustermu
Posted : Wednesday, February 1, 2006 11:36:12 AM
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
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.