authorgravatar for shane.kennedy19@gmail.comShane Kennedy <shane.kennedy19@gmail.com> 2022-08-22 12:57:51+02:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2022-08-22 13:57:51+03:00
logcd5a9ba1f4e38292d8e8c122c2e8ce4d3879367f
tree2773c02163a47e70e1de1a2e282f467fc5159613
parent24d718e7ebcf9b13044ead80510c6c703eebd929
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

lagnref: add signed integer repr documentation

Closes #11103

1 files changed, 2 insertions(+), 1 deletions(-)

doc/langref.html.in+2-1
......@@ -1521,7 +1521,8 @@ fn divide(a: i32, b: i32) i32 {
15211521 Zig supports arbitrary bit-width integers, referenced by using
15221522 an identifier of <code>i</code> or <code>u</code> followed by digits. For example, the identifier
15231523 {#syntax#}i7{#endsyntax#} refers to a signed 7-bit integer. The maximum allowed bit-width of an
1524 integer type is {#syntax#}65535{#endsyntax#}.
1524 integer type is {#syntax#}65535{#endsyntax#}. For signed integer types, Zig uses a
1525 <a href="https://en.wikipedia.org/wiki/Two's_complement">two's complement</a> representation.
15251526 </p>
15261527 {#see_also|Wrapping Operations#}
15271528 {#header_close#}