aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-07-16 10:53:15 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-07-16 10:53:15 -0400
commite9a03cccf375f11aa4e0a8a3515e499c88d05cde (patch)
tree6e6cd2117a7d25684a09a24be9f30ab684b650cc /doc
parent363f4facea7fac2d6cfeab9d1d276ecd8e8e4df0 (diff)
downloadzig-e9a03cccf375f11aa4e0a8a3515e499c88d05cde.tar.gz
zig-e9a03cccf375f11aa4e0a8a3515e499c88d05cde.zip
all integer sizes are available as primitives
* fix wrong implicit cast for `@IntType` bit_count parameter. * fix incorrect docs for `@IntType` bit_count parameter. closes #1242 closes #745 closes #1240
Diffstat (limited to 'doc')
-rw-r--r--doc/langref.html.in12
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/langref.html.in b/doc/langref.html.in
index ea672ccb17..46b325832b 100644
--- a/doc/langref.html.in
+++ b/doc/langref.html.in
@@ -2310,11 +2310,11 @@ test "while loop continue expression" {
}
test "while loop continue expression, more complicated" {
- var i1: usize = 1;
- var j1: usize = 1;
- while (i1 * j1 < 2000) : ({ i1 *= 2; j1 *= 3; }) {
- const my_ij1 = i1 * j1;
- assert(my_ij1 < 2000);
+ var i: usize = 1;
+ var j: usize = 1;
+ while (i * j < 2000) : ({ i *= 2; j *= 3; }) {
+ const my_ij = i * j;
+ assert(my_ij < 2000);
}
}
{#code_end#}
@@ -5424,7 +5424,7 @@ fn add(a: i32, b: i32) i32 { return a + b; }
{#header_close#}
{#header_open|@IntType#}
- <pre><code class="zig">@IntType(comptime is_signed: bool, comptime bit_count: u8) type</code></pre>
+ <pre><code class="zig">@IntType(comptime is_signed: bool, comptime bit_count: u32) type</code></pre>
<p>
This function returns an integer type with the given signness and bit count.
</p>