Skip to content

Commit

Permalink
Merge pull request #929 from Havvy/float-literal-example
Browse files Browse the repository at this point in the history
Add a float examle without a `.`.
  • Loading branch information
ehuss authored Jan 12, 2021
2 parents 3e93fea + 8e62ab3 commit e30d515
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ Examples of floating-point literals of various forms:
0.1f64; // type f64
0.1f32; // type f32
12E+99_f64; // type f64
5f32; // type f32
let x: f64 = 2.; // type f64
```

Expand All @@ -517,9 +518,7 @@ syntax with a floating point literal ending in a period. `2.f64` would attempt
to call a method named `f64` on `2`.

The representation semantics of floating-point numbers are described in
["Machine Types"].

["Machine Types"]: types/numeric.md
["Machine Types"][machine types].

### Boolean literals

Expand Down Expand Up @@ -637,6 +636,7 @@ them are referred to as "token trees" in [macros]. The three types of brackets
[if let]: expressions/if-expr.md#if-let-expressions
[keywords]: keywords.md
[lazy-bool]: expressions/operator-expr.md#lazy-boolean-operators
[machine types]: types/numeric.md
[macros]: macros-by-example.md
[match]: expressions/match-expr.md
[negation]: expressions/operator-expr.md#negation-operators
Expand Down

0 comments on commit e30d515

Please sign in to comment.