authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-05-05 14:39:50-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-05-05 14:39:50-07:00
logebff436985c9410d2a2759c69a277fcb30831a87
treeea359b08211b28b6540cbfdb6f67385639623664
parent56265d6f9934f7321d2001c9d07ce82b0c9be126

langref: fix incorrect description of `>>` operation


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

doc/langref.html.in+9-1
......@@ -1459,7 +1459,15 @@ a >>= b{#endsyntax#}</pre></td>
14591459 </td>
14601460 <td>
14611461 <ul>
1462 <li>Moves all bits to the right, inserting zeroes at the most-significant bit.</li>
1462 <li>When LHS is unsigned, performs a <strong>logical
1463 shift</strong>, moving all bits to the right, inserting zeroes at
1464 the most-significant bit.</li>
1465
1466 <li>When LHS is signed, performs an <strong>arithmetic
1467 shift</strong>, moving all bits to the right, inserting ones at
1468 the most-significant bit if and only if the most significant bit
1469 is one.</li>
1470
14631471 <li>{#syntax#}b{#endsyntax#} must be
14641472 {#link|comptime-known|comptime#} or have a type with log2 number
14651473 of bits as {#syntax#}a{#endsyntax#}.</li>