[Newbies] In Squeak SmallTalk, what can I do to display a number in any hex I want?

RedTigerFish chihuyu at gmail.com
Mon Oct 23 11:10:03 UTC 2017


Hello, thanks for your answer.

Here is my thinking:

Transcript show: (23124234 * 431213) hex; cr 

The above code only displays a decimal in hexadecimal which is base-16.
Now I want a decimal number to be displayed in base-17 or 20 or 100 or 250
or any positive integer.
How can I do that? Is that possible in Smalltalk?

I tried "Method Finder" and typed in Selector Browser "23 . '17r16' , only
to get the warning: no single method does that function.

Any method I can solve this problem ?



--
Sent from: http://forum.world.st/Squeak-Beginners-f107673.html


More information about the Beginners mailing list