authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-01-21 19:40:41-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-01-21 20:31:13-07:00
log1b8e6b8ba9c6a0f52e2d823218732bb2dc8a0362
tree3842f887baf9813c23828f27c59c82826c28c7c9
parentf29217ae0c3ddb26f3bb437f26852ffe5f6d1623

langref: clean up the table of operators

* remove whitespace * add column for name * rename "description" to "remarks" * clarify bit shift left and bit shift right closes #17126

1 files changed, 170 insertions(+), 124 deletions(-)

doc/langref.html.in+170-124
......@@ -8,7 +8,7 @@
88 <link rel="icon" href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNTMgMTQwIj48ZyBmaWxsPSIjRjdBNDFEIj48Zz48cG9seWdvbiBwb2ludHM9IjQ2LDIyIDI4LDQ0IDE5LDMwIi8+PHBvbHlnb24gcG9pbnRzPSI0NiwyMiAzMywzMyAyOCw0NCAyMiw0NCAyMiw5NSAzMSw5NSAyMCwxMDAgMTIsMTE3IDAsMTE3IDAsMjIiIHNoYXBlLXJlbmRlcmluZz0iY3Jpc3BFZGdlcyIvPjxwb2x5Z29uIHBvaW50cz0iMzEsOTUgMTIsMTE3IDQsMTA2Ii8+PC9nPjxnPjxwb2x5Z29uIHBvaW50cz0iNTYsMjIgNjIsMzYgMzcsNDQiLz48cG9seWdvbiBwb2ludHM9IjU2LDIyIDExMSwyMiAxMTEsNDQgMzcsNDQgNTYsMzIiIHNoYXBlLXJlbmRlcmluZz0iY3Jpc3BFZGdlcyIvPjxwb2x5Z29uIHBvaW50cz0iMTE2LDk1IDk3LDExNyA5MCwxMDQiLz48cG9seWdvbiBwb2ludHM9IjExNiw5NSAxMDAsMTA0IDk3LDExNyA0MiwxMTcgNDIsOTUiIHNoYXBlLXJlbmRlcmluZz0iY3Jpc3BFZGdlcyIvPjxwb2x5Z29uIHBvaW50cz0iMTUwLDAgNTIsMTE3IDMsMTQwIDEwMSwyMiIvPjwvZz48Zz48cG9seWdvbiBwb2ludHM9IjE0MSwyMiAxNDAsNDAgMTIyLDQ1Ii8+PHBvbHlnb24gcG9pbnRzPSIxNTMsMjIgMTUzLDExNyAxMDYsMTE3IDEyMCwxMDUgMTI1LDk1IDEzMSw5NSAxMzEsNDUgMTIyLDQ1IDEzMiwzNiAxNDEsMjIiIHNoYXBlLXJlbmRlcmluZz0iY3Jpc3BFZGdlcyIvPjxwb2x5Z29uIHBvaW50cz0iMTI1LDk1IDEzMCwxMTAgMTA2LDExNyIvPjwvZz48L2c+PC9zdmc+">
99 <style>
1010 :root{
11 --nav-width: 24em;
11 --nav-width: 26em;
1212 --nav-margin-l: 1em;
1313 }
1414 body{
......@@ -27,6 +27,25 @@
2727 #navigation {
2828 padding: 0 1em;
2929 }
30 table ul {
31 list-style-type: none;
32 padding: 0em;
33 }
34 table li {
35 padding-bottom: 1em;
36 line-height:1.2em;
37 }
38 table, th, td {
39 border-collapse: collapse;
40 border: 1px solid grey;
41 }
42 th, td {
43 padding: 0.5em;
44 }
45 th[scope=row] {
46 text-align: left;
47 font-weight: normal;
48 }
3049
3150 @media screen and (min-width: 1025px) {
3251 header {
......@@ -61,17 +80,6 @@
6180 dt {
6281 font-weight: bold;
6382 }
64 table, th, td {
65 border-collapse: collapse;
66 border: 1px solid grey;
67 }
68 th, td {
69 padding: 0.1em;
70 }
71 th[scope=row] {
72 text-align: left;
73 font-weight: normal;
74 }
7583 .sgr-1m {
7684 font-weight: bold;
7785 }
......@@ -1475,26 +1483,27 @@ pub fn main() void {
14751483 {#header_open|Table of Operators#}
14761484 <div class="table-wrapper">
14771485 <table>
1478 <caption>Table of Operators</caption>
14791486 <thead>
14801487 <tr>
1488 <th scope="col">Name</th>
14811489 <th scope="col">Syntax</th>
1482 <th scope="col">Relevant Types</th>
1483 <th scope="col">Description</th>
1490 <th scope="col">Types</th>
1491 <th scope="col">Remarks</th>
14841492 <th scope="col">Example</th>
14851493 </tr>
14861494 </thead>
14871495 <tbody>
14881496 <tr>
1489 <th scope="row"><pre>{#syntax#}a + b
1490a += b{#endsyntax#}</pre></th>
1497 <td>Addition</td>
1498 <td><pre>{#syntax#}a + b
1499a += b{#endsyntax#}</pre></td>
14911500 <td>
14921501 <ul>
14931502 <li>{#link|Integers#}</li>
14941503 <li>{#link|Floats#}</li>
14951504 </ul>
14961505 </td>
1497 <td>Addition.
1506 <td>
14981507 <ul>
14991508 <li>Can cause {#link|overflow|Default Operations#} for integers.</li>
15001509 <li>Invokes {#link|Peer Type Resolution#} for the operands.</li>
......@@ -1506,51 +1515,54 @@ a += b{#endsyntax#}</pre></th>
15061515 </td>
15071516 </tr>
15081517 <tr>
1509 <th scope="row"><pre>{#syntax#}a +% b
1510a +%= b{#endsyntax#}</pre></th>
1518 <td>Wrapping Addition</td>
1519 <td><pre>{#syntax#}a +% b
1520a +%= b{#endsyntax#}</pre></td>
15111521 <td>
15121522 <ul>
15131523 <li>{#link|Integers#}</li>
15141524 </ul>
15151525 </td>
1516 <td>Wrapping Addition.
1526 <td>
15171527 <ul>
1518 <li>Guaranteed to have twos-complement wrapping behavior.</li>
1528 <li>Twos-complement wrapping behavior.</li>
15191529 <li>Invokes {#link|Peer Type Resolution#} for the operands.</li>
15201530 <li>See also {#link|@addWithOverflow#}.</li>
15211531 </ul>
15221532 </td>
15231533 <td>
1524 <pre>{#syntax#}@as(u32, std.math.maxInt(u32)) +% 1 == 0{#endsyntax#}</pre>
1534 <pre>{#syntax#}@as(u32, 0xffffffff) +% 1 == 0{#endsyntax#}</pre>
15251535 </td>
15261536 </tr>
15271537 <tr>
1528 <th scope="row"><pre>{#syntax#}a +| b
1529a +|= b{#endsyntax#}</pre></th>
1538 <td>Saturating Addition</td>
1539 <td><pre>{#syntax#}a +| b
1540a +|= b{#endsyntax#}</pre></td>
15301541 <td>
15311542 <ul>
15321543 <li>{#link|Integers#}</li>
15331544 </ul>
15341545 </td>
1535 <td>Saturating Addition.
1546 <td>
15361547 <ul>
15371548 <li>Invokes {#link|Peer Type Resolution#} for the operands.</li>
15381549 </ul>
15391550 </td>
15401551 <td>
1541 <pre>{#syntax#}@as(u32, std.math.maxInt(u32)) +| 1 == @as(u32, std.math.maxInt(u32)){#endsyntax#}</pre>
1552 <pre>{#syntax#}@as(u8, 255) +| 1 == @as(u8, 255){#endsyntax#}</pre>
15421553 </td>
15431554 </tr>
15441555 <tr>
1545 <th scope="row"><pre>{#syntax#}a - b
1546a -= b{#endsyntax#}</pre></th>
1556 <td>Subtraction</td>
1557 <td><pre>{#syntax#}a - b
1558a -= b{#endsyntax#}</pre></td>
15471559 <td>
15481560 <ul>
15491561 <li>{#link|Integers#}</li>
15501562 <li>{#link|Floats#}</li>
15511563 </ul>
15521564 </td>
1553 <td>Subtraction.
1565 <td>
15541566 <ul>
15551567 <li>Can cause {#link|overflow|Default Operations#} for integers.</li>
15561568 <li>Invokes {#link|Peer Type Resolution#} for the operands.</li>
......@@ -1562,33 +1574,35 @@ a -= b{#endsyntax#}</pre></th>
15621574 </td>
15631575 </tr>
15641576 <tr>
1565 <th scope="row"><pre>{#syntax#}a -% b
1566a -%= b{#endsyntax#}</pre></th>
1577 <td>Wrapping Subtraction</td>
1578 <td><pre>{#syntax#}a -% b
1579a -%= b{#endsyntax#}</pre></td>
15671580 <td>
15681581 <ul>
15691582 <li>{#link|Integers#}</li>
15701583 </ul>
15711584 </td>
1572 <td>Wrapping Subtraction.
1585 <td>
15731586 <ul>
1574 <li>Guaranteed to have twos-complement wrapping behavior.</li>
1587 <li>Twos-complement wrapping behavior.</li>
15751588 <li>Invokes {#link|Peer Type Resolution#} for the operands.</li>
15761589 <li>See also {#link|@subWithOverflow#}.</li>
15771590 </ul>
15781591 </td>
15791592 <td>
1580 <pre>{#syntax#}@as(u32, 0) -% 1 == std.math.maxInt(u32){#endsyntax#}</pre>
1593 <pre>{#syntax#}@as(u8, 0) -% 1 == 255{#endsyntax#}</pre>
15811594 </td>
15821595 </tr>
15831596 <tr>
1584 <th scope="row"><pre>{#syntax#}a -| b
1585a -|= b{#endsyntax#}</pre></th>
1597 <td>Saturating Subtraction</td>
1598 <td><pre>{#syntax#}a -| b
1599a -|= b{#endsyntax#}</pre></td>
15861600 <td>
15871601 <ul>
15881602 <li>{#link|Integers#}</li>
15891603 </ul>
15901604 </td>
1591 <td>Saturating Subtraction.
1605 <td>
15921606 <ul>
15931607 <li>Invokes {#link|Peer Type Resolution#} for the operands.</li>
15941608 </ul>
......@@ -1598,7 +1612,8 @@ a -|= b{#endsyntax#}</pre></th>
15981612 </td>
15991613 </tr>
16001614 <tr>
1601 <th scope="row"><pre>{#syntax#}-a{#endsyntax#}</pre></th>
1615 <td>Negation</td>
1616 <td><pre>{#syntax#}-a{#endsyntax#}</pre></td>
16021617 <td>
16031618 <ul>
16041619 <li>{#link|Integers#}</li>
......@@ -1606,7 +1621,6 @@ a -|= b{#endsyntax#}</pre></th>
16061621 </ul>
16071622 </td>
16081623 <td>
1609 Negation.
16101624 <ul>
16111625 <li>Can cause {#link|overflow|Default Operations#} for integers.</li>
16121626 </ul>
......@@ -1616,32 +1630,33 @@ a -|= b{#endsyntax#}</pre></th>
16161630 </td>
16171631 </tr>
16181632 <tr>
1619 <th scope="row"><pre>{#syntax#}-%a{#endsyntax#}</pre></th>
1633 <td>Wrapping Negation</td>
1634 <td><pre>{#syntax#}-%a{#endsyntax#}</pre></td>
16201635 <td>
16211636 <ul>
16221637 <li>{#link|Integers#}</li>
16231638 </ul>
16241639 </td>
16251640 <td>
1626 Wrapping Negation.
16271641 <ul>
1628 <li>Guaranteed to have twos-complement wrapping behavior.</li>
1642 <li>Twos-complement wrapping behavior.</li>
16291643 </ul>
16301644 </td>
16311645 <td>
1632 <pre>{#syntax#}-%@as(i32, std.math.minInt(i32)) == std.math.minInt(i32){#endsyntax#}</pre>
1646 <pre>{#syntax#}-%@as(i8, -127) == -127{#endsyntax#}</pre>
16331647 </td>
16341648 </tr>
16351649 <tr>
1636 <th scope="row"><pre>{#syntax#}a * b
1637a *= b{#endsyntax#}</pre></th>
1650 <td>Multiplication</td>
1651 <td><pre>{#syntax#}a * b
1652a *= b{#endsyntax#}</pre></td>
16381653 <td>
16391654 <ul>
16401655 <li>{#link|Integers#}</li>
16411656 <li>{#link|Floats#}</li>
16421657 </ul>
16431658 </td>
1644 <td>Multiplication.
1659 <td>
16451660 <ul>
16461661 <li>Can cause {#link|overflow|Default Operations#} for integers.</li>
16471662 <li>Invokes {#link|Peer Type Resolution#} for the operands.</li>
......@@ -1653,16 +1668,17 @@ a *= b{#endsyntax#}</pre></th>
16531668 </td>
16541669 </tr>
16551670 <tr>
1656 <th scope="row"><pre>{#syntax#}a *% b
1657a *%= b{#endsyntax#}</pre></th>
1671 <td>Wrapping Multiplication</td>
1672 <td><pre>{#syntax#}a *% b
1673a *%= b{#endsyntax#}</pre></td>
16581674 <td>
16591675 <ul>
16601676 <li>{#link|Integers#}</li>
16611677 </ul>
16621678 </td>
1663 <td>Wrapping Multiplication.
1679 <td>
16641680 <ul>
1665 <li>Guaranteed to have twos-complement wrapping behavior.</li>
1681 <li>Twos-complement wrapping behavior.</li>
16661682 <li>Invokes {#link|Peer Type Resolution#} for the operands.</li>
16671683 <li>See also {#link|@mulWithOverflow#}.</li>
16681684 </ul>
......@@ -1672,14 +1688,15 @@ a *%= b{#endsyntax#}</pre></th>
16721688 </td>
16731689 </tr>
16741690 <tr>
1675 <th scope="row"><pre>{#syntax#}a *| b
1676a *|= b{#endsyntax#}</pre></th>
1691 <td>Saturating Multiplication</td>
1692 <td><pre>{#syntax#}a *| b
1693a *|= b{#endsyntax#}</pre></td>
16771694 <td>
16781695 <ul>
16791696 <li>{#link|Integers#}</li>
16801697 </ul>
16811698 </td>
1682 <td>Saturating Multiplication.
1699 <td>
16831700 <ul>
16841701 <li>Invokes {#link|Peer Type Resolution#} for the operands.</li>
16851702 </ul>
......@@ -1689,15 +1706,16 @@ a *|= b{#endsyntax#}</pre></th>
16891706 </td>
16901707 </tr>
16911708 <tr>
1692 <th scope="row"><pre>{#syntax#}a / b
1693a /= b{#endsyntax#}</pre></th>
1709 <td>Division</td>
1710 <td><pre>{#syntax#}a / b
1711a /= b{#endsyntax#}</pre></td>
16941712 <td>
16951713 <ul>
16961714 <li>{#link|Integers#}</li>
16971715 <li>{#link|Floats#}</li>
16981716 </ul>
16991717 </td>
1700 <td>Division.
1718 <td>
17011719 <ul>
17021720 <li>Can cause {#link|overflow|Default Operations#} for integers.</li>
17031721 <li>Can cause {#link|Division by Zero#} for integers.</li>
......@@ -1715,15 +1733,16 @@ a /= b{#endsyntax#}</pre></th>
17151733 </td>
17161734 </tr>
17171735 <tr>
1718 <th scope="row"><pre>{#syntax#}a % b
1719a %= b{#endsyntax#}</pre></th>
1736 <td>Remainder Division</td>
1737 <td><pre>{#syntax#}a % b
1738a %= b{#endsyntax#}</pre></td>
17201739 <td>
17211740 <ul>
17221741 <li>{#link|Integers#}</li>
17231742 <li>{#link|Floats#}</li>
17241743 </ul>
17251744 </td>
1726 <td>Remainder Division.
1745 <td>
17271746 <ul>
17281747 <li>Can cause {#link|Division by Zero#} for integers.</li>
17291748 <li>Can cause {#link|Division by Zero#} for floats in {#link|FloatMode.Optimized Mode|Floating Point Operations#}.</li>
......@@ -1739,33 +1758,39 @@ a %= b{#endsyntax#}</pre></th>
17391758 </td>
17401759 </tr>
17411760 <tr>
1742 <th scope="row"><pre>{#syntax#}a << b
1743a <<= b{#endsyntax#}</pre></th>
1761 <td>Bit Shift Left</td>
1762 <td><pre>{#syntax#}a << b
1763a <<= b{#endsyntax#}</pre></td>
17441764 <td>
17451765 <ul>
17461766 <li>{#link|Integers#}</li>
17471767 </ul>
17481768 </td>
1749 <td>Bit Shift Left.
1769 <td>
17501770 <ul>
1751 <li>{#syntax#}b{#endsyntax#} must be {#link|comptime-known|comptime#} or have a type with log2 number of bits as {#syntax#}a{#endsyntax#}.</li>
1771 <li>Moves all bits to the left, inserting new zeroes at the
1772 least-significant bit.</li>
1773 <li>{#syntax#}b{#endsyntax#} must be
1774 {#link|comptime-known|comptime#} or have a type with log2 number
1775 of bits as {#syntax#}a{#endsyntax#}.</li>
17521776 <li>See also {#link|@shlExact#}.</li>
17531777 <li>See also {#link|@shlWithOverflow#}.</li>
17541778 </ul>
17551779 </td>
17561780 <td>
1757 <pre>{#syntax#}1 << 8 == 256{#endsyntax#}</pre>
1781 <pre>{#syntax#}0b1 << 8 == 0b100000000{#endsyntax#}</pre>
17581782 </td>
17591783 </tr>
17601784 <tr>
1761 <th scope="row"><pre>{#syntax#}a <<| b
1762a <<|= b{#endsyntax#}</pre></th>
1785 <td>Saturating Bit Shift Left</td>
1786 <td><pre>{#syntax#}a <<| b
1787a <<|= b{#endsyntax#}</pre></td>
17631788 <td>
17641789 <ul>
17651790 <li>{#link|Integers#}</li>
17661791 </ul>
17671792 </td>
1768 <td>Saturating Bit Shift Left.
1793 <td>
17691794 <ul>
17701795 <li>See also {#link|@shlExact#}.</li>
17711796 <li>See also {#link|@shlWithOverflow#}.</li>
......@@ -1776,32 +1801,37 @@ a <<|= b{#endsyntax#}</pre></th>
17761801 </td>
17771802 </tr>
17781803 <tr>
1779 <th scope="row"><pre>{#syntax#}a >> b
1780a >>= b{#endsyntax#}</pre></th>
1804 <td>Bit Shift Right</td>
1805 <td><pre>{#syntax#}a >> b
1806a >>= b{#endsyntax#}</pre></td>
17811807 <td>
17821808 <ul>
17831809 <li>{#link|Integers#}</li>
17841810 </ul>
17851811 </td>
1786 <td>Bit Shift Right.
1812 <td>
17871813 <ul>
1788 <li>{#syntax#}b{#endsyntax#} must be {#link|comptime-known|comptime#} or have a type with log2 number of bits as {#syntax#}a{#endsyntax#}.</li>
1814 <li>Moves all bits to the right, inserting zeroes at the most-significant bit.</li>
1815 <li>{#syntax#}b{#endsyntax#} must be
1816 {#link|comptime-known|comptime#} or have a type with log2 number
1817 of bits as {#syntax#}a{#endsyntax#}.</li>
17891818 <li>See also {#link|@shrExact#}.</li>
17901819 </ul>
17911820 </td>
17921821 <td>
1793 <pre>{#syntax#}10 >> 1 == 5{#endsyntax#}</pre>
1822 <pre>{#syntax#}0b1010 >> 1 == 0b101{#endsyntax#}</pre>
17941823 </td>
17951824 </tr>
17961825 <tr>
1797 <th scope="row"><pre>{#syntax#}a & b
1798a &= b{#endsyntax#}</pre></th>
1826 <td>Bitwise And</td>
1827 <td><pre>{#syntax#}a & b
1828a &= b{#endsyntax#}</pre></td>
17991829 <td>
18001830 <ul>
18011831 <li>{#link|Integers#}</li>
18021832 </ul>
18031833 </td>
1804 <td>Bitwise AND.
1834 <td>
18051835 <ul>
18061836 <li>Invokes {#link|Peer Type Resolution#} for the operands.</li>
18071837 </ul>
......@@ -1811,14 +1841,15 @@ a &= b{#endsyntax#}</pre></th>
18111841 </td>
18121842 </tr>
18131843 <tr>
1814 <th scope="row"><pre>{#syntax#}a | b
1815a |= b{#endsyntax#}</pre></th>
1844 <td>Bitwise Or</td>
1845 <td><pre>{#syntax#}a | b
1846a |= b{#endsyntax#}</pre></td>
18161847 <td>
18171848 <ul>
18181849 <li>{#link|Integers#}</li>
18191850 </ul>
18201851 </td>
1821 <td>Bitwise OR.
1852 <td>
18221853 <ul>
18231854 <li>Invokes {#link|Peer Type Resolution#} for the operands.</li>
18241855 </ul>
......@@ -1828,14 +1859,15 @@ a |= b{#endsyntax#}</pre></th>
18281859 </td>
18291860 </tr>
18301861 <tr>
1831 <th scope="row"><pre>{#syntax#}a ^ b
1832a ^= b{#endsyntax#}</pre></th>
1862 <td>Bitwise Xor</td>
1863 <td><pre>{#syntax#}a ^ b
1864a ^= b{#endsyntax#}</pre></td>
18331865 <td>
18341866 <ul>
18351867 <li>{#link|Integers#}</li>
18361868 </ul>
18371869 </td>
1838 <td>Bitwise XOR.
1870 <td>
18391871 <ul>
18401872 <li>Invokes {#link|Peer Type Resolution#} for the operands.</li>
18411873 </ul>
......@@ -1845,30 +1877,30 @@ a ^= b{#endsyntax#}</pre></th>
18451877 </td>
18461878 </tr>
18471879 <tr>
1848 <th scope="row"><pre>{#syntax#}~a{#endsyntax#}</pre></th>
1880 <td>Bitwise Not</td>
1881 <td><pre>{#syntax#}~a{#endsyntax#}</pre></td>
18491882 <td>
18501883 <ul>
18511884 <li>{#link|Integers#}</li>
18521885 </ul>
18531886 </td>
1854 <td>
1855 Bitwise NOT.
1856 </td>
1887 <td></td>
18571888 <td>
18581889 <pre>{#syntax#}~@as(u8, 0b10101111) == 0b01010000{#endsyntax#}</pre>
18591890 </td>
18601891 </tr>
18611892 <tr>
1862 <th scope="row"><pre>{#syntax#}a orelse b{#endsyntax#}</pre></th>
1893 <td>Defaulting Optional Unwrap</td>
1894 <td><pre>{#syntax#}a orelse b{#endsyntax#}</pre></td>
18631895 <td>
18641896 <ul>
18651897 <li>{#link|Optionals#}</li>
18661898 </ul>
18671899 </td>
18681900 <td>If {#syntax#}a{#endsyntax#} is {#syntax#}null{#endsyntax#},
1869 returns {#syntax#}b{#endsyntax#} ("default value"),
1870 otherwise returns the unwrapped value of {#syntax#}a{#endsyntax#}.
1871 Note that {#syntax#}b{#endsyntax#} may be a value of type {#link|noreturn#}.
1901 returns {#syntax#}b{#endsyntax#} ("default value"),
1902 otherwise returns the unwrapped value of {#syntax#}a{#endsyntax#}.
1903 Note that {#syntax#}b{#endsyntax#} may be a value of type {#link|noreturn#}.
18721904 </td>
18731905 <td>
18741906 <pre>{#syntax#}const value: ?u32 = null;
......@@ -1877,7 +1909,8 @@ unwrapped == 1234{#endsyntax#}</pre>
18771909 </td>
18781910 </tr>
18791911 <tr>
1880 <th scope="row"><pre>{#syntax#}a.?{#endsyntax#}</pre></th>
1912 <td>Optional Unwrap</td>
1913 <td><pre>{#syntax#}a.?{#endsyntax#}</pre></td>
18811914 <td>
18821915 <ul>
18831916 <li>{#link|Optionals#}</li>
......@@ -1893,18 +1926,19 @@ value.? == 5678{#endsyntax#}</pre>
18931926 </td>
18941927 </tr>
18951928 <tr>
1896 <th scope="row"><pre>{#syntax#}a catch b
1897a catch |err| b{#endsyntax#}</pre></th>
1929 <td>Defaulting Error Unwrap</td>
1930 <td><pre>{#syntax#}a catch b
1931a catch |err| b{#endsyntax#}</pre></td>
18981932 <td>
18991933 <ul>
19001934 <li>{#link|Error Unions|Errors#}</li>
19011935 </ul>
19021936 </td>
19031937 <td>If {#syntax#}a{#endsyntax#} is an {#syntax#}error{#endsyntax#},
1904 returns {#syntax#}b{#endsyntax#} ("default value"),
1905 otherwise returns the unwrapped value of {#syntax#}a{#endsyntax#}.
1906 Note that {#syntax#}b{#endsyntax#} may be a value of type {#link|noreturn#}.
1907 {#syntax#}err{#endsyntax#} is the {#syntax#}error{#endsyntax#} and is in scope of the expression {#syntax#}b{#endsyntax#}.
1938 returns {#syntax#}b{#endsyntax#} ("default value"),
1939 otherwise returns the unwrapped value of {#syntax#}a{#endsyntax#}.
1940 Note that {#syntax#}b{#endsyntax#} may be a value of type {#link|noreturn#}.
1941{#syntax#}err{#endsyntax#} is the {#syntax#}error{#endsyntax#} and is in scope of the expression {#syntax#}b{#endsyntax#}.
19081942 </td>
19091943 <td>
19101944 <pre>{#syntax#}const value: anyerror!u32 = error.Broken;
......@@ -1913,51 +1947,55 @@ unwrapped == 1234{#endsyntax#}</pre>
19131947 </td>
19141948 </tr>
19151949 <tr>
1916 <th scope="row"><pre>{#syntax#}a and b{#endsyntax#}</pre></th>
1950 <td>Logical And</td>
1951 <td><pre>{#syntax#}a and b{#endsyntax#}</pre></td>
19171952 <td>
19181953 <ul>
19191954 <li>{#link|bool|Primitive Types#}</li>
19201955 </ul>
19211956 </td>
19221957 <td>
1923 If {#syntax#}a{#endsyntax#} is {#syntax#}false{#endsyntax#}, returns {#syntax#}false{#endsyntax#}
1924 without evaluating {#syntax#}b{#endsyntax#}. Otherwise, returns {#syntax#}b{#endsyntax#}.
1958 If {#syntax#}a{#endsyntax#} is {#syntax#}false{#endsyntax#}, returns {#syntax#}false{#endsyntax#}
1959 without evaluating {#syntax#}b{#endsyntax#}. Otherwise, returns {#syntax#}b{#endsyntax#}.
19251960 </td>
19261961 <td>
19271962 <pre>{#syntax#}(false and true) == false{#endsyntax#}</pre>
19281963 </td>
19291964 </tr>
19301965 <tr>
1931 <th scope="row"><pre>{#syntax#}a or b{#endsyntax#}</pre></th>
1966 <td>Logical Or</td>
1967 <td><pre>{#syntax#}a or b{#endsyntax#}</pre></td>
19321968 <td>
19331969 <ul>
19341970 <li>{#link|bool|Primitive Types#}</li>
19351971 </ul>
19361972 </td>
19371973 <td>
1938 If {#syntax#}a{#endsyntax#} is {#syntax#}true{#endsyntax#}, returns {#syntax#}true{#endsyntax#}
1939 without evaluating {#syntax#}b{#endsyntax#}. Otherwise, returns {#syntax#}b{#endsyntax#}.
1974 If {#syntax#}a{#endsyntax#} is {#syntax#}true{#endsyntax#},
1975 returns {#syntax#}true{#endsyntax#} without evaluating
1976 {#syntax#}b{#endsyntax#}. Otherwise, returns
1977 {#syntax#}b{#endsyntax#}.
19401978 </td>
19411979 <td>
19421980 <pre>{#syntax#}(false or true) == true{#endsyntax#}</pre>
19431981 </td>
19441982 </tr>
19451983 <tr>
1946 <th scope="row"><pre>{#syntax#}!a{#endsyntax#}</pre></th>
1984 <td>Boolean Not</td>
1985 <td><pre>{#syntax#}!a{#endsyntax#}</pre></td>
19471986 <td>
19481987 <ul>
19491988 <li>{#link|bool|Primitive Types#}</li>
19501989 </ul>
19511990 </td>
1952 <td>
1953 Boolean NOT.
1954 </td>
1991 <td></td>
19551992 <td>
19561993 <pre>{#syntax#}!false == true{#endsyntax#}</pre>
19571994 </td>
19581995 </tr>
19591996 <tr>
1960 <th scope="row"><pre>{#syntax#}a == b{#endsyntax#}</pre></th>
1997 <td>Equality</td>
1998 <td><pre>{#syntax#}a == b{#endsyntax#}</pre></td>
19611999 <td>
19622000 <ul>
19632001 <li>{#link|Integers#}</li>
......@@ -1975,7 +2013,8 @@ unwrapped == 1234{#endsyntax#}</pre>
19752013 </td>
19762014 </tr>
19772015 <tr>
1978 <th scope="row"><pre>{#syntax#}a == null{#endsyntax#}</pre></th>
2016 <td>Null Check</td>
2017 <td><pre>{#syntax#}a == null{#endsyntax#}</pre></td>
19792018 <td>
19802019 <ul>
19812020 <li>{#link|Optionals#}</li>
......@@ -1990,7 +2029,8 @@ unwrapped == 1234{#endsyntax#}</pre>
19902029 </td>
19912030 </tr>
19922031 <tr>
1993 <th scope="row"><pre>{#syntax#}a != b{#endsyntax#}</pre></th>
2032 <td>Inequality</td>
2033 <td><pre>{#syntax#}a != b{#endsyntax#}</pre></td>
19942034 <td>
19952035 <ul>
19962036 <li>{#link|Integers#}</li>
......@@ -2008,7 +2048,8 @@ unwrapped == 1234{#endsyntax#}</pre>
20082048 </td>
20092049 </tr>
20102050 <tr>
2011 <th scope="row"><pre>{#syntax#}a != null{#endsyntax#}</pre></th>
2051 <td>Non-Null Check</td>
2052 <td><pre>{#syntax#}a != null{#endsyntax#}</pre></td>
20122053 <td>
20132054 <ul>
20142055 <li>{#link|Optionals#}</li>
......@@ -2023,7 +2064,8 @@ unwrapped == 1234{#endsyntax#}</pre>
20232064 </td>
20242065 </tr>
20252066 <tr>
2026 <th scope="row"><pre>{#syntax#}a > b{#endsyntax#}</pre></th>
2067 <td>Greater Than</td>
2068 <td><pre>{#syntax#}a > b{#endsyntax#}</pre></td>
20272069 <td>
20282070 <ul>
20292071 <li>{#link|Integers#}</li>
......@@ -2039,7 +2081,8 @@ unwrapped == 1234{#endsyntax#}</pre>
20392081 </td>
20402082 </tr>
20412083 <tr>
2042 <th scope="row"><pre>{#syntax#}a >= b{#endsyntax#}</pre></th>
2084 <td>Greater or Equal</td>
2085 <td><pre>{#syntax#}a >= b{#endsyntax#}</pre></td>
20432086 <td>
20442087 <ul>
20452088 <li>{#link|Integers#}</li>
......@@ -2055,7 +2098,8 @@ unwrapped == 1234{#endsyntax#}</pre>
20552098 </td>
20562099 </tr>
20572100 <tr>
2058 <th scope="row"><pre>{#syntax#}a < b{#endsyntax#}</pre></th>
2101 <td>Less Than</td>
2102 <td><pre>{#syntax#}a < b{#endsyntax#}</pre></td>
20592103 <td>
20602104 <ul>
20612105 <li>{#link|Integers#}</li>
......@@ -2071,7 +2115,8 @@ unwrapped == 1234{#endsyntax#}</pre>
20712115 </td>
20722116 </tr>
20732117 <tr>
2074 <th scope="row"><pre>{#syntax#}a <= b{#endsyntax#}</pre></th>
2118 <td>Lesser or Equal</td>
2119 <td><pre>{#syntax#}a <= b{#endsyntax#}</pre></td>
20752120 <td>
20762121 <ul>
20772122 <li>{#link|Integers#}</li>
......@@ -2087,14 +2132,14 @@ unwrapped == 1234{#endsyntax#}</pre>
20872132 </td>
20882133 </tr>
20892134 <tr>
2090 <th scope="row"><pre>{#syntax#}a ++ b{#endsyntax#}</pre></th>
2135 <td>Array Concatenation</td>
2136 <td><pre>{#syntax#}a ++ b{#endsyntax#}</pre></td>
20912137 <td>
20922138 <ul>
20932139 <li>{#link|Arrays#}</li>
20942140 </ul>
20952141 </td>
20962142 <td>
2097 Array concatenation.
20982143 <ul>
20992144 <li>Only available when the lengths of both {#syntax#}a{#endsyntax#} and {#syntax#}b{#endsyntax#} are {#link|compile-time known|comptime#}.</li>
21002145 </ul>
......@@ -2108,14 +2153,14 @@ mem.eql(u32, &together, &[_]u32{1,2,3,4}){#endsyntax#}</pre>
21082153 </td>
21092154 </tr>
21102155 <tr>
2111 <th scope="row"><pre>{#syntax#}a ** b{#endsyntax#}</pre></th>
2156 <td>Array Multiplication</td>
2157 <td><pre>{#syntax#}a ** b{#endsyntax#}</pre></td>
21122158 <td>
21132159 <ul>
21142160 <li>{#link|Arrays#}</li>
21152161 </ul>
21162162 </td>
21172163 <td>
2118 Array multiplication.
21192164 <ul>
21202165 <li>Only available when the length of {#syntax#}a{#endsyntax#} and {#syntax#}b{#endsyntax#} are {#link|compile-time known|comptime#}.</li>
21212166 </ul>
......@@ -2127,7 +2172,8 @@ mem.eql(u8, pattern, "ababab"){#endsyntax#}</pre>
21272172 </td>
21282173 </tr>
21292174 <tr>
2130 <th scope="row"><pre>{#syntax#}a.*{#endsyntax#}</pre></th>
2175 <td>Pointer Dereference</td>
2176 <td><pre>{#syntax#}a.*{#endsyntax#}</pre></td>
21312177 <td>
21322178 <ul>
21332179 <li>{#link|Pointers#}</li>
......@@ -2143,12 +2189,12 @@ ptr.* == 1234{#endsyntax#}</pre>
21432189 </td>
21442190 </tr>
21452191 <tr>
2146 <th scope="row"><pre>{#syntax#}&a{#endsyntax#}</pre></th>
2192 <td>Address Of</td>
2193 <td><pre>{#syntax#}&a{#endsyntax#}</pre></td>
21472194 <td>
21482195 All types
21492196 </td>
21502197 <td>
2151 Address of.
21522198 </td>
21532199 <td>
21542200 <pre>{#syntax#}const x: u32 = 1234;
......@@ -2157,7 +2203,8 @@ ptr.* == 1234{#endsyntax#}</pre>
21572203 </td>
21582204 </tr>
21592205 <tr>
2160 <th scope="row"><pre>{#syntax#}a || b{#endsyntax#}</pre></th>
2206 <td>Error Set Merge</td>
2207 <td><pre>{#syntax#}a || b{#endsyntax#}</pre></td>
21612208 <td>
21622209 <ul>
21632210 <li>{#link|Error Set Type#}</li>
......@@ -11376,7 +11423,6 @@ fn readU32Be() u32 {}
1137611423 {#header_open|Keyword Reference#}
1137711424 <div class="table-wrapper">
1137811425 <table>
11379 <caption>Keywords</caption>
1138011426 <thead>
1138111427 <tr>
1138211428 <th scope="col">Keyword</th>