Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006339 [Squeak] Kernel minor always 03-12-07 02:27 05-13-14 19:52
Reporter kmr1642 View Status public  
Assigned To
Priority normal Resolution fixed  
Status closed   Product Version 3.9
Summary 0006339: Character>> hex method fails
Description 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.
Additional Information
Attached Files

- Relationships

SYSTEM WARNING: Creating default object from empty value

SYSTEM WARNING: Creating default object from empty value

related to 0000987closed laza Deprecated Integer>>hex has still some senders 
related to 0006441closed  [BUG] SmallInteger hex not understood 

- Notes
(0010446 - 279 - 303 - 303 - 406 - 406 - 406)
laza
03-16-07 14:45

Hi!

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
 
(0010868 - 248 - 254 - 254 - 254 - 254 - 254)
johnpf
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 ).
 
(0014503 - 356 - 404 - 404 - 404 - 404 - 404)
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'
 

- Issue History
Date Modified Username Field Change
03-12-07 02:27 kmr1642 New Issue
03-16-07 14:45 laza Note Added: 0010446
03-16-07 16:11 laza Relationship added related to 0000987
03-31-07 14:11 jmf Issue Monitored: jmf
07-09-07 13:24 johnpf Note Added: 0010868
07-09-07 13:24 johnpf Issue Monitored: johnpf
07-17-07 03:35 wiz Relationship added related to 0006441
05-13-14 19:52 nicolas cellier Status new => closed
05-13-14 19:52 nicolas cellier Note Added: 0014503
05-13-14 19:52 nicolas cellier Resolution open => fixed
05-13-14 19:52 nicolas cellier Fixed in Version  => trunk


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
62 total queries executed.
44 unique queries executed.
Powered by Mantis Bugtracker