SYSTEM WARNING: Creating default object from empty value

SYSTEM WARNING: Creating default object from empty value

Mantis - Squeak
Viewing Issue Advanced Details
6339 Kernel minor always 03-12-07 02:27 05-13-14 19:52
closed 3.9  
none trunk  
0006339: Character>> hex method fails
Character>> hex method fails.
The method is implemented as:

    ^value hex.

where value is the ascii value integer between 0 and 256.
Neither Integer or SmallInteger implements a hex method --
rather it uses printStringBase: to print out a hexadecimal
representation. So the method will work if defined as:

    ^value printStringBase: 16.
related to 0000987closed laza Deprecated Integer>>hex has still some senders 
related to 0006441closed  [BUG] SmallInteger hex not understood 

03-16-07 14:45   

In 0000987 I explained, why I think that methods like hex hex8 or whatever should be avoided and I provided a hack to display the hex value of something for debugging purposes. I think it is included at least in 3.9.

I would suggest to remove the hex method from Character
07-09-07 13:24   
Please see 0006441 for a discussion of Integer>>hex and a fix. I don't think that the solutions listed here in 0000987 and 0000996 cover all use cases, and the printStringHex and storeStringHex have surprising results sometimes (such as 0005421 ).
nicolas cellier   
05-13-14 19:52   
This has been fixed in 2010 by Eliot ($A hex) doesn't fail anymore.
Of course, hex behaviour is a bit different depending on receiver class (only Integer would prepend a 16r radix specification), but this is another issue, so I consider this one resolved...

$A hex -> '41'.
123 hex -> '16r7B'.
#[1 2 3] hex -> '010203'.
1.0 hex -> '3FF0000000000000'