Is there a list that Smalltalk provides to show which keyboard character represents which number ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there a list that Smalltalk provides to show which keyboard character represents which number ?

RedTigerFish
 Transcript show: ((898324234234324329) printStringBase: 150); cr.


After executing the above code, I get the following:

<http://forum.world.st/file/t371379/tutu.jpg>

I understand that each of those characters represents a number which in this
case must be less than 150.
Is there a list that Smalltalk provides to show which keyboard character
represents which number ?



-----
Dig, dig where you are,
Down below's well.
Let those that walk in darkness shout,
Down below's hell.
--
Sent from: http://forum.world.st/Squeak-Beginners-f107673.html
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Dig, dig where you are,
Down below's well.
Let those that walk in darkness shout,
Down below's hell.
Reply | Threaded
Open this post in threaded view
|

Re: Is there a list that Smalltalk provides to show which keyboard character represents which number ?

Bert Freudenberg
On Mon, Oct 23, 2017 at 1:58 PM, RedTigerFish <[hidden email]> wrote:
 Transcript show: ((898324234234324329) printStringBase: 150); cr.


After executing the above code, I get the following:

<http://forum.world.st/file/t371379/tutu.jpg>

I understand that each of those characters represents a number which in this
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
=> 'C777D21AAA96569'

- Bert -​

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Is there a list that Smalltalk provides to show which keyboard character represents which number ?

RedTigerFish
I understand. Thanks a lot for your answer.



-----
Dig, dig where you are,
Down below's well.
Let those that walk in darkness shout,
Down below's hell.
--
Sent from: http://forum.world.st/Squeak-Beginners-f107673.html
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Dig, dig where you are,
Down below's well.
Let those that walk in darkness shout,
Down below's hell.