[Newbies] In Squeak SmallTalk, what can I do to display a number in any hex I want?
bert at freudenbergs.de
Wed Oct 25 00:20:58 UTC 2017
On Tue, Oct 24, 2017 at 11:06 PM, Ben Coman <btc at openinworld.com> wrote:
> On Tue, Oct 24, 2017 at 11:25 PM, Bert Freudenberg <bert at freudenbergs.de>
>> On Tue, Oct 24, 2017 at 5:14 PM, Chris Cunningham <
>> cunningham.cb at gmail.com> wrote:
>>> On Mon, Oct 23, 2017 at 10:32 AM, Bert Freudenberg <bert at freudenbergs.de
>>> > wrote:
>>>>> The only somewhat commonly used bases are 2, 8, 10, 13, and 16, as far
>>>> as I know.
>>>> - Bert -
>>> I haven't run across a reason to use base 13. What domain was that in?
>>> Just curious,
>> The answer is 42.
>> - Bert -
> And Adams swears this was never planned. Pure co-incidence that it worked
> out that way. Hmmmmmm.....?
> cheers -ben
Yep. For those not yet in on the joke:
In Douglas Adams "Hitchhiker" trilogy the number 42 plays an important
role, and at some point it was defined as 6x9. Intended as a joke, it
turned out that this is actually correct in base 13, and can be written
easily in Smalltalk, but not most other computer languages:
13r6 * 13r9 = 13r42
- Bert -
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners