wonder Expert Licensed User Longtime User Nov 14, 2014 #1 Hi guys! So I have the following line: Code: Label1.Text = (100%x) & " / " & (1%x * 100) Which gives me the following output: Code: 1280 / 1200 How is it possible that I'm getting different values? Shouldn't one hundred times one percent be one hundred percent? Am I missing something?
Hi guys! So I have the following line: Code: Label1.Text = (100%x) & " / " & (1%x * 100) Which gives me the following output: Code: 1280 / 1200 How is it possible that I'm getting different values? Shouldn't one hundred times one percent be one hundred percent? Am I missing something?
derez Expert Licensed User Longtime User Nov 14, 2014 #2 It is clear : 1%x is an int , its value is 12, not 12.8 , and the result is 12*100 = 1200 See documentation : PerXToCurrent (Percentage AsFloat) AsInt PerYToCurrent (Percentage AsFloat) AsInt Click to expand... (these functions are the same as %x,%y) Last edited: Nov 14, 2014 Upvote 0
It is clear : 1%x is an int , its value is 12, not 12.8 , and the result is 12*100 = 1200 See documentation : PerXToCurrent (Percentage AsFloat) AsInt PerYToCurrent (Percentage AsFloat) AsInt Click to expand... (these functions are the same as %x,%y)