Skip to content

Commit

Permalink
Merge pull request #296 from toml-lang/numberscores
Browse files Browse the repository at this point in the history
Allow underscores in numbers.
  • Loading branch information
mojombo committed Feb 11, 2015
2 parents 546c3b4 + 0406449 commit dc70c26
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,15 @@ Negative numbers are prefixed with a minus sign.
-17
```

For large numbers, you may use underscores to enhance readability. Each
underscore must be surrounded by at least one digit.

```toml
1_000
5_349_221
1_2_3_4_5 # valid but inadvisable
```

Leading zeros are not allowed. Hex, octal, and binary forms are not allowed.
Values such as "infinity" and "not a number" that cannot be expressed as a
series of digits are not allowed.
Expand Down Expand Up @@ -246,6 +255,14 @@ A fractional part is a decimal point followed by one or more digits.
An exponent part is an E (upper or lower case) followed by an integer part
(which may be prefixed with a plus or minus sign).

Similar to integers, you may use underscores to enhance readability. Each
underscore must be surrounded by at least one digit.

```toml
9_224_617.445_991_228_313
1e1_000
```

64-bit (double) precision expected.

Boolean
Expand Down

0 comments on commit dc70c26

Please sign in to comment.