Mantis - Squeak
Viewing Issue Advanced Details
6697 Kernel minor N/A 09-25-07 00:25 04-18-10 22:04
nicolas cellier  
closed 3.10  
none trunk  
0006697: Number>>storeOn:base: default implementation is wrong
It calls printOn:base:
But modern definition of printOn:base: don't print the radix prefix.
While storeOn:base: should.

This is one cause of [^]

Since the storeOn:base: method is defined in every subclass where relevant
(except ScaledDecimal see, [^] I strongly suggest to implement self subclassResponsibility in Number like printOn:base:

Don't expect a test case for this bug. It is quite trivial and virtual, because it is in an abstract class and it is overriden in subclasses. But it is a bug. To show it, one need to define a new Number class defining just printOn:base: but not storeOn:base: SUPER-HEAVY-NONSENSE
related to 0006695closed andreas Float storeStringBase: does not store the radix 
related to 0006696assigned andreas ScaledDecimal can read in base 16 but cannot print in base 16 
 NumberStoreOnBase-M6697-Patch.1.cs [^] (617 bytes) 09-25-07 00:30

nicolas cellier   
09-25-07 00:31   
The patch also add a comment to printOn:base:
nicolas cellier   
09-25-07 00:57   
In 3.8 the code was correct because printOn:base: USED TO print the radix prefix

Who ever made the change SHOULD have taken care of all implementors and senders.

Was it a good decision anyway?
Standard compliant?
Has it been discussed in squeak-dev or somewhere?

12-17-07 17:26   
"fix begin"
Installer mantis bug: 6697 fix:'NumberStoreOnBase-M6697-Patch.1.cs'.
"fix end"

nicolas cellier   
10-04-09 17:56   
Fixed in [^]