J
John Gregory
I have Ruby 1.9.1p129 and I want to convert an ASCII character to an
Integer and a Float.
While reading the following web page, I found conflicts in the code
usage:
'Convert an Character to the ASCII Character Code'
Integer (?e)
=> 101
(then further down)
Float (?e)
=> 101.0
I received errors as per the attached screen snapshot.
I have found out that it is because I have version 1.9 and the above was
only workable in version 1.8.
I would still like to know how to get the same results using my current
version.
Thanks.
Attachments:
http://www.ruby-forum.com/attachment/3867/convert_error.jpeg
Integer and a Float.
While reading the following web page, I found conflicts in the code
usage:
'Convert an Character to the ASCII Character Code'
Integer (?e)
=> 101
(then further down)
Float (?e)
=> 101.0
I received errors as per the attached screen snapshot.
I have found out that it is because I have version 1.9 and the above was
only workable in version 1.8.
I would still like to know how to get the same results using my current
version.
Thanks.
Attachments:
http://www.ruby-forum.com/attachment/3867/convert_error.jpeg