ForexGG Posted June 4, 2009 Share Posted June 4, 2009 here is my code $QUOTE_STA = IniRead("test.ini", "QUOTE", "QUOTE_STA", "NONE") $QUOTE_END = IniRead("test.ini", "QUOTE", "QUOTE_END", "NONE") MsgBox(0,"",$QUOTE_END & " " & $QUOTE_STA) MsgBox(0,"", $QUOTE_END >= $QUOTE_STA) Read in $QUOTE_END is 100 and $QUOTE_STA is 99.05 why the results gives me false? Below is my test.ini file [QUOTE] QUOTE_STA = 99.05 QUOTE_END = 100 Link to comment Share on other sites More sharing options...
ForexGG Posted June 4, 2009 Author Share Posted June 4, 2009 I can put Number($QUOTE_END) to make it ture, but why should I do that? Link to comment Share on other sites More sharing options...
Developers Jos Posted June 4, 2009 Developers Share Posted June 4, 2009 I can put Number($QUOTE_END) to make it ture, but why should I do that?Because else you are comparing 2 strings, so you need to convert it to a number when reading from the INI file.Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ajag Posted June 4, 2009 Share Posted June 4, 2009 I can put Number($QUOTE_END) to make it ture, but why should I do that?I think because of this:'1' < '2' < '3' < ... < '9' < 'a' < 'b' < 'c' ...(Variables are basicaly Variant, not Numbers) Rule #1: Always do a backup Rule #2: Always do a backup (backup of rule #1) Link to comment Share on other sites More sharing options...
ForexGG Posted June 4, 2009 Author Share Posted June 4, 2009 Thank you guys! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now