Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix octal literal mentions #684

Merged
merged 1 commit into from
Nov 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix octal literal mentions
`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
commit 4abcb82b865c20f6c8011c6f252e4b201e89d7c6
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