зеркало из https://github.com/github/ruby.git
* 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
This commit is contained in:
Родитель
d8cda04488
Коммит
8255e83912
|
@ -1,3 +1,7 @@
|
|||
Wed Dec 19 16:30:28 2012 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* doc/syntax/literals.rdoc: Added 0d decimal format. Thanks Nobu!
|
||||
|
||||
Wed Dec 19 16:19:36 2012 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* doc/syntax/methods.rdoc: Fixed typo. Thanks to Josh Susser.
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче