2003/09/24 07:33:32
[org.ibex.core.git] / src / org / xwt / js / JS.java
index ea12dfb..2ed9755 100644 (file)
@@ -51,8 +51,9 @@ public abstract class JS {
     public static Number toNumber(Object o) {
         if (o == null) return new Long(0);
         if (o instanceof Number) return ((Number)o);
-        // FIXME: There are about 3 pages of rules in ecma262 about string to number conversions
-        // We aren't even close to following all those rules
+
+        // NOTE: There are about 3 pages of rules in ecma262 about string to number conversions
+        //       We aren't even close to following all those rules.  We probably never will be.
         if (o instanceof String) try { return new Double((String)o); } catch (NumberFormatException e) { return new Double(Double.NaN); }
         if (o instanceof Boolean) return ((Boolean)o).booleanValue() ? new Long(1) : new Long(0);
         if (o instanceof JS) return ((JS)o).coerceToNumber();