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


Groups > comp.lang.javascript > #17328

Re: how to remove trailing decimal or decimal 0 of a string?

Path csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail
From Dr J R Stockton <reply1247@merlyn.demon.co.uk.invalid>
Newsgroups comp.lang.javascript
Subject Re: how to remove trailing decimal or decimal 0 of a string?
Date Wed, 21 Nov 2012 19:00:40 +0000
Organization Home
Lines 46
Message-ID <QixCTeFYTSrQFwj7@invalid.uk.co.demon.merlyn.invalid> (permalink)
References <e89247f7-aa7b-4c64-9de5-265ab78a5336@googlegroups.com> <20121117112826.00530fe7@bootnic.server> <1788183.LAg6v8g3if@PointedEars.de> <pLrc5UI14oqQFwuP@invalid.uk.co.demon.merlyn.invalid> <1538569.gxPoS1l1Lc@PointedEars.de>
NNTP-Posting-Host JfH6RRPWQh8XzArFI0xgxA.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain;charset=us-ascii
X-Complaints-To abuse@aioe.org
User-Agent Turnpike/6.05-S (<hH5ExtWAcs85tA9uwu5bCnAjP6>)
X-Notice Filtered by postfilter v. 0.8.2
Xref csiph.com comp.lang.javascript:17328

Show key headers only | View raw


In comp.lang.javascript message <1538569.gxPoS1l1Lc@PointedEars.de>,
Tue, 20 Nov 2012 01:04:40, Thomas 'PointedEars' Lahn
<PointedEars@web.de> posted:

>Dr J R Stockton wrote:
>
>> Thomas 'PointedEars' Lahn <PointedEars@web.de> posted:
>>> Number(myString) will return NaN if there are any non-digits and non-dots
>>> in myString, ignoring leading whitespace.
>>
>> Trebly untrue, even disregarding the omissions of "decimal" and of
>> trailing whitespace.
>
>Pray tell.  Does Number(",") return NaN?  Does Number(" ,") return NaN?
>Does Number(" 42") return 42?
>
>You have conveniently snipped the part of my posting that qualified this
>statement (without marking the omission).  You really are to be pitied if
>you think have to resort to such lame tricks to get attention.

You made a definite false statement, and no subsequent qualification
negates that.  A skilled author would have put that statement last,
preceded by "Otherwise", or similar; or would have used "will generally
return".


But I must apologise; it was at least _quadruply_ untrue.


Who can list four or more distinct cases in which Number(myString) will
**NOT** return NaN although there are non-(digits or dots) in myString,
ignoring leading and trailing whitespace?



>> And, of course, those of the digits i v I V etc. which are in UniCode
>> 0000-FFFF, and IIRC various even stranger digits, including \u261D.

That was to amuse the more intelligent, and to inform those unaware of
Unicode i-xii I-XII characters.  You should have ignored it.

-- 
(c) John Stockton, nr London UK. Mail, see homepage.  DOS 3.3, 6.20; WinXP, 7.
   Web  <http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms & links.
   PAS EXE TXT ZIP via  <http://www.merlyn.demon.co.uk/programs/00index.htm>
   My DOS  <http://www.merlyn.demon.co.uk/batfiles.htm> - also batprogs.htm.

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


Thread

how to remove trailing decimal or decimal 0 of a string? skrite <shawn@skrite.net> - 2012-11-16 09:12 -0800
  Re: how to remove trailing decimal or decimal 0 of a string? Andrew Poulos <ap_prog@hotmail.com> - 2012-11-17 07:10 +1100
    Re: how to remove trailing decimal or decimal 0 of a string? Andrew Poulos <ap_prog@hotmail.com> - 2012-11-17 13:51 +1100
    Re: how to remove trailing decimal or decimal 0 of a string? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-17 15:37 +0100
      Re: how to remove trailing decimal or decimal 0 of a string? Andrew Poulos <ap_prog@hotmail.com> - 2012-11-18 08:28 +1100
        Re: how to remove trailing decimal or decimal 0 of a string? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-18 01:02 +0100
          Re: how to remove trailing decimal or decimal 0 of a string? Andrew Poulos <ap_prog@hotmail.com> - 2012-11-18 15:40 +1100
  Re: how to remove trailing decimal or decimal 0 of a string? Denis McMahon <denismfmcmahon@gmail.com> - 2012-11-17 08:05 +0000
  Re: how to remove trailing decimal or decimal 0 of a string? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-11-17 09:24 +0100
    Re: how to remove trailing decimal or decimal 0 of a string? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-11-17 09:29 +0100
  Re: how to remove trailing decimal or decimal 0 of a string? Christoph Becker <cmbecker69@gmx.de> - 2012-11-17 12:04 +0100
  Re: how to remove trailing decimal or decimal 0 of a string? BootNic <bootnic.bounce@gmail.com> - 2012-11-17 11:28 -0500
    Re: how to remove trailing decimal or decimal 0 of a string? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-18 01:56 +0100
      Re: how to remove trailing decimal or decimal 0 of a string? Dr J R Stockton <reply1247@merlyn.demon.co.uk.invalid> - 2012-11-19 19:53 +0000
        Re: how to remove trailing decimal or decimal 0 of a string? Andrew Poulos <ap_prog@hotmail.com> - 2012-11-20 11:03 +1100
          Re: how to remove trailing decimal or decimal 0 of a string? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-20 01:50 +0100
          Re: how to remove trailing decimal or decimal 0 of a string? Dr J R Stockton <reply1247@merlyn.demon.co.uk.invalid> - 2012-11-21 18:44 +0000
            Re: how to remove trailing decimal or decimal 0 of a string? Andrew Poulos <ap_prog@hotmail.com> - 2012-11-22 14:07 +1100
        Re: how to remove trailing decimal or decimal 0 of a string? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-20 01:04 +0100
          Re: how to remove trailing decimal or decimal 0 of a string? Dr J R Stockton <reply1247@merlyn.demon.co.uk.invalid> - 2012-11-21 19:00 +0000
      Re: how to remove trailing decimal or decimal 0 of a string? Christoph Becker <cmbecker69@gmx.de> - 2012-11-20 02:10 +0100
        Re: how to remove trailing decimal or decimal 0 of a string? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-20 21:58 +0100
        Re: how to remove trailing decimal or decimal 0 of a string? Dr J R Stockton <reply1247@merlyn.demon.co.uk.invalid> - 2012-11-21 19:09 +0000
  Re: how to remove trailing decimal or decimal 0 of a string? Dr J R Stockton <reply1246@merlyn.demon.co.uk.invalid> - 2012-11-17 21:08 +0000

csiph-web