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


Groups > comp.lang.javascript > #29523

Re: "ToNumber"

Path csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.javascript
Subject Re: "ToNumber"
Date Tue, 02 Feb 2016 23:01:10 +0000
Organization A noiseless patient Spider
Lines 27
Message-ID <87zivira2x.fsf@bsb.me.uk> (permalink)
References <ToNumber-20160201112005@ram.dialup.fu-berlin.de>
Mime-Version 1.0
Content-Type text/plain; charset=iso-8859-1
Content-Transfer-Encoding 8bit
Injection-Info mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="25120"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19jOwZsWSbFYcD0P9WebOTb6rVW5XwpJ3Y="
Cancel-Lock sha1:2dYAAvxfPhvvPE7otBokmzbjwiY= sha1:PaV+u4LYBg4EVcjxpu4kCDdFYBw=
X-BSB-Auth 1.505c2d2db1d841d7137f.20160202230110GMT.87zivira2x.fsf@bsb.me.uk
Xref csiph.com comp.lang.javascript:29523

Show key headers only | 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