Test the following lines under IronPython 1.1:

import System

intVar = System.Int32.Parsse("400")
floatVar = System.Single.Parse("400")
doubleVar = System.Double.Parse("400")
intVar>500, floatVar>500, doubleVar>500

=> (False, True, False)


It seemed that float number type compare incorrectly with int numbers. If I 
change the expression to

floatVar>500.0

the result is False (as expected).

Why this behaviour?



_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to