Page 1 of 1

Help with Bool Comparisons

Posted: Thu Mar 31, 2005 1:28 am
by Anasazu
I'm having trouble with comparisons for some odd reason. When comparing two test variables using Bool, I keep getting TRUE. However when I use Math.Calc to compare these integer variables, I get 1 or 0. Anyone know what I'm doing wrong?
|-----------------------------------------------------------------------------------------
Sub Main

/declare TestVariable int outer 100
/echo ${TestVariable}
/declare TestVariable2 int outer 2000
/echo ${TestVariable2}
/declare BigTimer timer outer 9999999

/echo Compare TestVariable>TestVariable2 ${Math.Calc[${BigTimer}>${TestVariable2}]}
/echo Compare TestVariable<TestVariable2 ${Math.Calc[${BigTimer}<${TestVariable2}]}
/echo Compare TestVariable==TestVariable2 ${Math.Calc[${TestVariable}==${TestVariable2}]}

/echo ${Math.Calc[100>1000]}
/echo ${Math.Calc[100=<1000]}
/echo ${Math.Calc[100==1000]}

/echo Compare TestVariable>TestVariable2 ${Bool[${Math.Calc[${BigTimer}>${TestVariable2}]}==1]}
/echo Compare TestVariable<TestVariable2 ${Bool[${Math.Calc[${BigTimer}<${TestVariable2}]}==1]}
/echo Compare TestVariable==TestVariable2 ${Bool[${Math.Calc[${TestVariable}==${TestVariable2}]}==1]}

/echo Compare TestVariable>TestVariable2 ${Bool[${Math.Calc[100>1000]}==1]}
/echo Compare TestVariable<TestVariable2 ${Bool[${Math.Calc[100=<1000]}==1]}
/echo Compare TestVariable==TestVariable2 ${Bool[${Math.Calc[100==1000]}==1]}


:Main_Routine
/doevents

/goto :Main_Routine
/return

http://www.macroquest2.com/wiki/index.php/TLO:Target

Posted: Thu Mar 31, 2005 1:38 am
by Lax
What are you doing wrong? You mean like linking to TLO:Target which has nothing to do with your post, to get around having to put any effort into following the instructions given?