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


Groups > comp.lang.javascript > #29523 > unrolled thread

Re: "ToNumber"

Started byBen Bacarisse <ben.usenet@bsb.me.uk>
First post2016-02-02 23:01 +0000
Last post2016-02-03 17:33 +0100
Articles 2 — 2 participants

Back to article view | Back to comp.lang.javascript

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  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

#29523 — Re: "ToNumber"

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2016-02-02 23:01 +0000
SubjectRe: "ToNumber"
Message-ID<87zivira2x.fsf@bsb.me.uk>
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.

[toc] | [next] | [standalone]


#29524

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2016-02-03 17:33 +0100
Message-ID<4820975.AoxcDLRMNg@PointedEars.de>
In reply to#29523
Ben Bacarisse wrote:

> ram@zedat.fu-berlin.de (Stefan Ram) writes:
>>   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."
> 
> ?

<news:undefined-20160201114012@ram.dialup.fu-berlin.de>

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web