authorgravatar for jay@jayschwa.netJay Petacat <jay@jayschwa.net> 2018-07-17 21:18:41-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-07-17 21:18:41-04:00
log6394f7e9a3f0d6db58287dee96af3cb9fae8ee8a
tree8ada509800c670796839834d9025e2e6ceeca11a
parenta9ab528e348a3f07dfaffcdcb1031062b1bfe8bb

Fixed minor documentation errors (#1256)

Changed: - "retuns" to "returns" - "null-terminated pointers" to "pointers to null-terminated arrays"

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

doc/langref.html.in+3-3
...@@ -1087,7 +1087,7 @@ unwrapped == 1234</code></pre>...@@ -1087,7 +1087,7 @@ unwrapped == 1234</code></pre>
1087 </td>1087 </td>
1088 <td>1088 <td>
1089 If <code>a</code> is <code>false</code>, returns <code>false</code>1089 If <code>a</code> is <code>false</code>, returns <code>false</code>
1090 without evaluating <code>b</code>. Otherwise, retuns <code>b</code>.1090 without evaluating <code>b</code>. Otherwise, returns <code>b</code>.
1091 </td>1091 </td>
1092 <td>1092 <td>
1093 <pre><code class="zig">false and true == false</code></pre>1093 <pre><code class="zig">false and true == false</code></pre>
...@@ -1102,7 +1102,7 @@ unwrapped == 1234</code></pre>...@@ -1102,7 +1102,7 @@ unwrapped == 1234</code></pre>
1102 </td>1102 </td>
1103 <td>1103 <td>
1104 If <code>a</code> is <code>true</code>, returns <code>true</code>1104 If <code>a</code> is <code>true</code>, returns <code>true</code>
1105 without evaluating <code>b</code>. Otherwise, retuns <code>b</code>.1105 without evaluating <code>b</code>. Otherwise, returns <code>b</code>.
1106 </td>1106 </td>
1107 <td>1107 <td>
1108 <pre><code class="zig">false or true == true</code></pre>1108 <pre><code class="zig">false or true == true</code></pre>
...@@ -1483,7 +1483,7 @@ test "pointer array access" {...@@ -1483,7 +1483,7 @@ test "pointer array access" {
1483}1483}
14841484
1485test "pointer slicing" {1485test "pointer slicing" {
1486 // In Zig, we prefer using slices over null-terminated pointers.1486 // In Zig, we prefer slices over pointers to null-terminated arrays.
1487 // You can turn an array into a slice using slice syntax:1487 // You can turn an array into a slice using slice syntax:
1488 var array = []u8{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };1488 var array = []u8{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
1489 const slice = array[2..4];1489 const slice = array[2..4];