objective c - iPhone producing strange results on 'if' statement -
I have a UIPicker where the user specifies the specified time (i.e. 13:00, 13:01, 13:02, Etc.).) - which determines their score. Once they press the button, comes with a warning score that is determined by this 'if-else' statement. Everything works the best of time - but I am getting some irregular behavior this code is:
// gets my value from UIPicker and then converts it into a format Which can be used in the 'if' statement. NSInteger runRow = [Runtime Picture Selected ROYInComponent: 2]; NSSTING * RUNSHAKED = [Runtime PictureData ObjectExtends: Runro]; NSSTING * RUNSHAKED FIXED = [SELECTED STRONG BAYER REPLLING OCURANCE OFFSTRING: @ ":" STRANGE: @ ".]; // Actual 'if' statement if (select selected float value] & lt; = 13.00) {runScore = 100; } And if ([selected float value selected] <= 13.06) {runScore = 99; } And if ([selected float value selected] <= 13.12) {runScore = 97; } And if ([selected float value selected]
Now, when I test the program, then when I select '13: 00 'then I will get the result of hope which is' 100'. Whenever I select all the time between '13: 01 and 13:05 'then I get the estimated result of' 99 '. But, when I select '13: 06 'then gives me a score of '97' and I get a score of '97: 97 to 13:12' - which is the desired result. Why do I get the right to '97' on '13: 12 ', but' 13: 06 'does not get' 99 'right ?? Can this be a memory leak or something else ???
integer? E.g.
NSString * runSelectedFixed = [String Bayer Replacing OrcinesOffString Selection: @ ":" withString: @ ""];
..
Comments
Post a Comment