diff options
Diffstat (limited to 'runtime/doc/usr_41.txt')
-rw-r--r-- | runtime/doc/usr_41.txt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index a190bf2f27..c9321e8736 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -118,7 +118,8 @@ Numbers can be decimal, hexadecimal, octal or binary. A hexadecimal number starts with "0x" or "0X". For example "0x1f" is decimal 31. -An octal number starts with a zero and another digit. "017" is decimal 15. +An octal number starts with "0o", "0O" or a zero and another digit. "0o17" is +decimal 15. A binary number starts with "0b" or "0B". For example "0b101" is decimal 5. @@ -127,14 +128,14 @@ number, it will be interpreted as an octal number! The ":echo" command always prints decimal numbers. Example: > - :echo 0x7f 036 + :echo 0x7f 0o36 < 127 30 ~ A number is made negative with a minus sign. This also works for hexadecimal, octal and binary numbers. A minus sign is also used for subtraction. Compare this with the previous example: > - :echo 0x7f -036 + :echo 0x7f -0o36 < 97 ~ White space in an expression is ignored. However, it's recommended to use it @@ -142,7 +143,7 @@ for separating items, to make the expression easier to read. For example, to avoid the confusion with a negative number above, put a space between the minus sign and the following number: > - :echo 0x7f - 036 + :echo 0x7f - 0o36 ============================================================================== *41.2* Variables |