Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^2: why are hex values not numbers?

by Eily (Monsignor)
on Sep 27, 2016 at 17:11 UTC ( #1172768=note: print w/replies, xml ) Need Help??

in reply to Re: why are hex values not numbers?
in thread why are hex values not numbers?

Following my last edit, I realized there's a good reason why using a string as a number is not always the same as simply removing the quotes. It's so that if you ask for user input, the user can type "042", or select this value in a form that pads its numbers with 0, and you'll still get the value the user meant to send rather than 34. I guess having "042" != 042 for this reason but "0x16" == 0x16 is more surprising than only having decimal numbers work this way.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1172768]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2022-12-05 08:33 GMT
Find Nodes?
    Voting Booth?

    No recent polls found