I want to convert a hexadecimal string to a decimal (base 10) number:
The 1st line returns the correct answer of 255, while the 2nd line gives an error. Why doesn't it work?
As already stated in the comments the
(I intend this to illustrate that this notation is "evaluated" before the main evaluator ever sees it.)
This parsing is really no different from other numerical notation in Mathematica, for example
As Simon Woods recommended, for programmatic input of hexadecimals use