Skip to content

Commit

Permalink
Fix octal literal mentions (#684)
Browse files Browse the repository at this point in the history
`u8::MAX`/255 is `0xo[377]` and we don't intend to carry the remaining
bit.
Closes #670

Co-authored-by: Tomochika Hara <[email protected]>
  • Loading branch information
sholderbach and thara committed Nov 27, 2022
1 parent beb662d commit 68d2241
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion book/types_of_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ You can write binary as a literal using any of the `0x[...]`, `0b[...]`, or `0o[
```sh
> 0x[1F FF] # Hexadecimal
> 0b[1 1010] # Binary
> 0o[777] # Octal
> 0o[377] # Octal
```

Incomplete bytes will be left-padded with zeros.
Expand Down
2 changes: 1 addition & 1 deletion de/book/types_of_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ Binär kann explizit wörtlich geschrieben werden in einer der Formen `0x[...]`,
```
> 0x[1F FF] # Hexadecimal
> 0b[1 1010] # Binary
> 0o[777] # Octal
> 0o[377] # Octal
```

Nicht vollständige bytes werden links mit Nullen aufgefüllt (left-padded)
Expand Down
2 changes: 1 addition & 1 deletion zh-CN/book/types_of_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ Eg) `1wk`是一个星期的时间间隔。
```
> 0x[1F FF] # 十六进制
> 0b[1 1010] # 二进制
> 0o[777] # 八进制
> 0o[377] # 八进制
```

不完整的字节将用零来填充。
Expand Down

0 comments on commit 68d2241

Please sign in to comment.