Re: How does ?A return the ASCII value of A ?



Dave Baldwin schrieb:
I have always used 'A'[0] to return the ASCII value of A and as rickhg12hs wrote ?A will do the same thing. I cannot find any reference to this in Pickaxe so can anyone explain how this works?

Page 50 (first edition) or here:

http://phrogz.net/ProgrammingRuby/tut_stdtypes.html#numbers

Regards,
Pit


.



Relevant Pages