Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #29523

Re: "ToNumber"

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.javascript
Subject Re: "ToNumber"
Date 2016-02-02 23:01 +0000
Organization A noiseless patient Spider
Message-ID <87zivira2x.fsf@bsb.me.uk> (permalink)
References <ToNumber-20160201112005@ram.dialup.fu-berlin.de>

Show all headers | View raw


ram@zedat.fu-berlin.de (Stefan Ram) writes:

> < Math.floor()
>> NaN
>
>   Is this specified by ECMAScript?
>
>   »20.2.2  Function Properties of the Math Object« says, »Each
>   of the following Math object functions applies the ToNumber
>   abstract operation to each of its arguments«, but then
>   »7.1.3  ToNumber ( argument )« seems to already assume
>   that there actually /is/ an argument.
>
>   Ok, surely I can guess that »ToNumber ()« is the same as
>   »ToNumber ( undefined )«, but even in 7 or 7.1, I cannot
>   find a wording that says so.

  "Unless otherwise specified in the description of a particular
  function, if a built-in function or constructor is given fewer
  arguments than the function is specified to require, the function or
  constructor shall behave exactly as if it had been given sufficient
  additional arguments, each such argument being the undefined value."

?

-- 
Ben.

Back to comp.lang.javascript | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: "ToNumber" Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-02-02 23:01 +0000
  Re: "ToNumber" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-02-03 17:33 +0100

csiph-web