diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-19 07:30:58 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-19 07:30:58 +0000 |
commit | 8255e83912f908a6ea50f7989ac27b8587fca2b6 (patch) | |
tree | 177e9673fafef3370149579d9b4061d7cb2b7598 /doc | |
parent | d8cda044883c587ba75140b72200b94051a28349 (diff) |
* doc/syntax/literals.rdoc: Added 0d decimal format. Thanks Nobu!
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'doc')
-rw-r--r-- | doc/syntax/literals.rdoc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/syntax/literals.rdoc b/doc/syntax/literals.rdoc index 61743f7906..ea3c3d8135 100644 --- a/doc/syntax/literals.rdoc +++ b/doc/syntax/literals.rdoc @@ -43,13 +43,17 @@ Floating point numbers may be written as follows: These numbers have the same value, 12.34. You may use underscores in floating point numbers as well. -You can also write numbers in hexadecimal, octal or binary formats. For +You can use a special prefix to write numbers in decimal, hexadecimal, octal +or binary formats. For decimal numbers use a prefix of <tt>0d</tt>, for hexadecimal numbers use a prefix of <tt>0x</tt>, for octal numbers use a prefix of <tt>0</tt> or <tt>0o</tt>, for binary numbers use a prefix of <tt>0b</tt>. The alphabetic component of the number is not case-sensitive. Examples: + 0d170 + 0D170 + 0xaa 0xAa 0xAA |