4 Replies Latest reply on Jan 19, 2007 1:17 PM by FlightGuy

    Question about casting objects into Number

    dimival Level 1
      This might sound a bit silly, but i have a function that casts an Object into a Number and then checks if it is NaN to ensure that it is indeed a number, it returns true if it is a valid number or false if it isn't a number

      Now i have a TextInput and when i type for example "HELLO" and call the function it returns false (since that is not a number), if i type 23 it returns true (it is a number), if i type "20a" it returns false. Everything works fine except for one combination, if i type any number and the letter "e", for example 2e, 9E, 5e, etc, it returns true, which means this is a valid Number, why is this?