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


Groups > comp.lang.javascript > #40274

Re: Decimal numeric string to hexadecimal numeric string?

Path csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.javascript
Subject Re: Decimal numeric string to hexadecimal numeric string?
Date Thu, 01 Jul 2021 01:50:05 +0100
Organization A noiseless patient Spider
Lines 30
Message-ID <878s2qkgci.fsf@bsb.me.uk> (permalink)
References <d210bffe-abab-448a-b36b-e1b27f3e25c0n@googlegroups.com> <233183ba-98dc-47d5-84f6-bd3beef1e793n@googlegroups.com> <db65730d-8ad2-478f-938b-b8398d62cdadn@googlegroups.com> <87fsxegmpj.fsf@bsb.me.uk> <20837730.9tcgPO3Tcr@PointedEars.de> <0d312dec-5b2c-4a8b-9bb0-fe0c1fd867f9n@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain
Injection-Info reader02.eternal-september.org; posting-host="a2d8b1c21ccbe83bdb1b6c6beabf5900"; logging-data="31250"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Ib8cVexKxBP7HtNH5aofbYXm4I4+pDLM="
Cancel-Lock sha1:CggZmJc1lg7Sz7D9A3lHXE7gHBQ= sha1:mJR4xNHQrIJNaI+MvrtzM2bba3I=
X-BSB-Auth 1.cb67da99e8512fb7f4cf.20210701015005BST.878s2qkgci.fsf@bsb.me.uk
Xref csiph.com comp.lang.javascript:40274

Show key headers only | View raw


"Michael Haufe (TNO)" <tno@thenewobjective.com> writes:

> On Wednesday, June 30, 2021 at 5:51:16 PM UTC-5, Thomas 'PointedEars' Lahn wrote:
>
>> parseInt() should not be called without a radix value because then the 
>> interpretation of the string depends on its prefix. This is a FAQ. 
>
> The FAQ should be updated. This now depends on the browser version.
>
> With the following:
>
> parseInt("070")
>
> I see these results:
>
> Brave (Chromium 91):  70
> Firefox : 89: 70
> IE 11: 70
> IE 10: 70
> IE 9: 70
> IE 8: 56
> IE 7: 56
> IE 5: 56

But parseInt("0x70") should be 112 (and it is where I was able to test
it).  I don't know if you are specifically talking about the 0 prefix
(not specified in ECMA-262) or about prefixes in general.

-- 
Ben.

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


Thread

Decimal numeric string to hexadecimal numeric string? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-06-17 14:28 -0700
  Re: Decimal numeric string to hexadecimal numeric string? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2021-06-17 21:38 -0700
    Re: Decimal numeric string to hexadecimal numeric string? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-06-19 00:39 -0700
  Re: Decimal numeric string to hexadecimal numeric string? Scott Sauyet <scott@sauyet.com> - 2021-06-18 05:59 -0700
    Re: Decimal numeric string to hexadecimal numeric string? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-06-19 00:45 -0700
      Re: Decimal numeric string to hexadecimal numeric string? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-06-19 11:42 +0100
        Re: Decimal numeric string to hexadecimal numeric string? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-07-01 00:51 +0200
          Re: Decimal numeric string to hexadecimal numeric string? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2021-06-30 17:39 -0700
            Re: Decimal numeric string to hexadecimal numeric string? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-07-01 01:50 +0100
              Re: Decimal numeric string to hexadecimal numeric string? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-07-01 12:46 +0200
            Re: Decimal numeric string to hexadecimal numeric string? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-07-01 12:43 +0200

csiph-web