[Newbies] In Squeak SmallTalk, what can I do to display a number in any hex I want?
K K Subbu
kksubbu.ml at gmail.com
Mon Oct 23 06:43:48 UTC 2017
On Monday 23 October 2017 10:40 AM, RedTigerFish wrote:
> Transcript show: 'aa='. Transcript show: 23124234 * 431213; cr.
> The output is aa=9971470315842 9971470315842 is a decimal number. What
> can I do to display a number in any hex I want ??
Transcript show: (23124234 * 431213) hex; cr
You can discover such functions by giving an example in Method Finder.
For instance 23 is represented as 16r17 in hex, so:
23 . '16r17'
will reveal the method. For any radix, see printStringBase: method.
HTH .. Subbu
More information about the Beginners