Subj : Re: spidermonkey docu To : netscape.public.mozilla.jseng From : Jens Thiele Date : Thu Apr 08 2004 03:10 pm > But the doc does not lie. Converting to double and then to int loses no > information, it's just less efficient than what's actually done in the > implementation. > > So I'm not sure why you say the doc is wrong. It is not in error, it's > just (as usual, thanks to whoever wrote it for Netscape, ages ago) a bit > misleading about implementation, a bit too detailed in that respect, and > oddly not detailed enough in other ways. well yes it just caused me to do: if (JSVAL_IS_INT(v)) { ... = JSVAL_TO_INT(v); }else{ js_ValueToInt32 } ;-) .