/newif problem
Posted: Sat Apr 03, 2004 10:33 pm
First, to clear up any doubts about using the lastest version, I'm using MQ2-20040403.zip which was just released today, even though it doesn't have an updated changes.txt, it is tonights release. MQ was compiled with MQData and MQParms both enabled.
Now that thats out of the way....
it seems that all the problems since the string parsing with /newif seems to be with the following examples in their most basic form. Any /newif's I've had problems with, if I surround the condition with Math.Calc, it fixes any problems I've had. The problem does not exist if you use 1 instead of true, and 0 instead of false in the following examples. Using ${Bool[TRUE]}/${Bool[FALSE]} in the non-working part does not change the results.
Here's the test to try possibilities with /newif.
Please physicially run it and anaylse the results before commenting on this because its getting a little old seeing the "its been fixed patches ago" reply, when clearly its not working as it should be.
[/code]
Now that thats out of the way....
it seems that all the problems since the string parsing with /newif seems to be with the following examples in their most basic form. Any /newif's I've had problems with, if I surround the condition with Math.Calc, it fixes any problems I've had. The problem does not exist if you use 1 instead of true, and 0 instead of false in the following examples. Using ${Bool[TRUE]}/${Bool[FALSE]} in the non-working part does not change the results.
Here's the test to try possibilities with /newif.
Code: Select all
|doesn't work
/newif TRUE==TRUE {
/echo 1A - true
} else /echo 1A - false
|returns true
/newif TRUE==FALSE {
/echo 1B - true
} else /echo 1B - false
|returns ***true*** Should be false
/newif FALSE==TRUE {
/echo 1C - true
} else /echo 1C - false
|returns ***true*** Should be false
/newif FALSE==FALSE {
/echo 1D - true
} else /echo 1D - false
|returns true
|Works
/newif ${Math.Calc[TRUE==TRUE]} {
/echo 2A - true
} else /echo 2A - false
|returns true
/newif ${Math.Calc[TRUE==FALSE]} {
/echo 2B - true
} else /echo 2B - false
|returns false
/newif ${Math.Calc[FALSE==TRUE]} {
/echo 2C - true
} else /echo 2C - false
|returns false
/newif ${Math.Calc[FALSE==FALSE]} {
/echo 2D - true
} else /echo 2D - false
|returns true
|Works
/newif ${Math.Calc[TRUE]}==TRUE {
/echo 3A - true
} else /echo 3A - false
|returns true
/newif ${Math.Calc[TRUE]}==FALSE {
/echo 3B - true
} else /echo 3B - false
|returns false
/newif ${Math.Calc[FALSE]}==TRUE {
/echo 3C - true
} else /echo 3C - false
|returns false
/newif ${Math.Calc[FALSE]}==FALSE {
/echo 3D - true
} else /echo 3D - false
|returns true
|Works
/newif 1==1 {
/echo 4A - true
} else /echo 4A - false
|returns true
/newif 1==0 {
/echo 4B - true
} else /echo 4B - false
|returns false
/newif 0==1 {
/echo 4C - true
} else /echo 4C - false
|returns false
/newif 0==0 {
/echo 4D - true
} else /echo 4D - false
|returns true
Please physicially run it and anaylse the results before commenting on this because its getting a little old seeing the "its been fixed patches ago" reply, when clearly its not working as it should be.
[/code]