[Newbies] Is there a list that Smalltalk provides to show which keyboard character represents which number ?
bert at freudenbergs.de
Mon Oct 23 17:45:18 UTC 2017
On Mon, Oct 23, 2017 at 1:58 PM, RedTigerFish <chihuyu at gmail.com> wrote:
> Transcript show: ((898324234234324329) printStringBase: 150); cr.
> After executing the above code, I get the following:
> I understand that each of those characters represents a number which in
> case must be less than 150.
> Is there a list that Smalltalk provides to show which keyboard character
> represents which number ?
The code should give an error for any base > 36.
Right now it doesn't. If the receiver is a SmallInteger it simply uses the
Unicode character "n + 55" for a digit value "n", which accidentally works
for bases up to 200.
Btw, you do not need the Transcript to see the result. Simply select an
expression and "print it" (via menu, or Cmd/Alt-p keyboard shortcut)
898324234234324329 printStringBase: 16
- Bert -
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners