| ... | @@ -1018,21 +1018,6 @@ const unwrapped = value catch 1234; | ... | @@ -1018,21 +1018,6 @@ const unwrapped = value catch 1234; |
| 1018 | unwrapped == 1234</code></pre> | 1018 | unwrapped == 1234</code></pre> |
| 1019 | </td> | 1019 | </td> |
| 1020 | </tr> | 1020 | </tr> |
| 1021 | <tr> | | |
| 1022 | <td><pre><code class="zig">%%a</code></pre></td> | | |
| 1023 | <td> | | |
| 1024 | <ul> | | |
| 1025 | <li><a href="#errors">Error Unions</a></li> | | |
| 1026 | </ul> | | |
| 1027 | </td> | | |
| 1028 | <td>Equivalent to: | | |
| 1029 | <pre><code class="zig">a catch unreachable</code></pre> | | |
| 1030 | </td> | | |
| 1031 | <td> | | |
| 1032 | <pre><code class="zig">const value: %u32 = 5678; | | |
| 1033 | %%value == 5678</code></pre> | | |
| 1034 | </td> | | |
| 1035 | </tr> | | |
| 1036 | <tr> | 1021 | <tr> |
| 1037 | <td><pre><code class="zig">a and b<code></pre></td> | 1022 | <td><pre><code class="zig">a and b<code></pre></td> |
| 1038 | <td> | 1023 | <td> |
| ... | @@ -1260,7 +1245,7 @@ const ptr = &amp;x; | ... | @@ -1260,7 +1245,7 @@ const ptr = &amp;x; |
| 1260 | {#header_close#} | 1245 | {#header_close#} |
| 1261 | {#header_open|Precedence#} | 1246 | {#header_open|Precedence#} |
| 1262 | <pre><code>x() x[] x.y | 1247 | <pre><code>x() x[] x.y |
| 1263 | !x -x -%x ~x *x &amp;x ?x %x %%x ??x | 1248 | !x -x -%x ~x *x &amp;x ?x %x ??x |
| 1264 | x{} | 1249 | x{} |
| 1265 | * / % ** *% | 1250 | * / % ** *% |
| 1266 | + - ++ +% -% | 1251 | + - ++ +% -% |
| ... | @@ -5218,9 +5203,8 @@ const c = @cImport({ | ... | @@ -5218,9 +5203,8 @@ const c = @cImport({ |
| 5218 | <p> | 5203 | <p> |
| 5219 | You can mix Zig object files with any other object files that respect the C ABI. Example: | 5204 | You can mix Zig object files with any other object files that respect the C ABI. Example: |
| 5220 | </p> | 5205 | </p> |
| 5221 | {#header_close#} | 5206 | <p class="file">base64.zig</p> |
| 5222 | {#header_open|base64.zig#} | 5207 | {#code_begin|syntax#} |
| 5223 | {#code_begin|obj#} | | |
| 5224 | const base64 = @import("std").base64; | 5208 | const base64 = @import("std").base64; |
| 5225 | | 5209 | |
| 5226 | export fn decode_base_64(dest_ptr: &u8, dest_len: usize, | 5210 | export fn decode_base_64(dest_ptr: &u8, dest_len: usize, |
| ... | @@ -5234,8 +5218,7 @@ export fn decode_base_64(dest_ptr: &u8, dest_len: usize, | ... | @@ -5234,8 +5218,7 @@ export fn decode_base_64(dest_ptr: &u8, dest_len: usize, |
| 5234 | return decoded_size; | 5218 | return decoded_size; |
| 5235 | } | 5219 | } |
| 5236 | {#code_end#} | 5220 | {#code_end#} |
| 5237 | {#header_close#} | 5221 | <p class="file">test.c</p> |
| 5238 | {#header_open|test.c#} | | |
| 5239 | <pre><code class="cpp">// This header is generated by zig from base64.zig | 5222 | <pre><code class="cpp">// This header is generated by zig from base64.zig |
| 5240 | #include "base64.h" | 5223 | #include "base64.h" |
| 5241 | | 5224 | |
| ... | @@ -5252,8 +5235,7 @@ int main(int argc, char **argv) { | ... | @@ -5252,8 +5235,7 @@ int main(int argc, char **argv) { |
| 5252 | | 5235 | |
| 5253 | return 0; | 5236 | return 0; |
| 5254 | }</code></pre> | 5237 | }</code></pre> |
| 5255 | {#header_close#} | 5238 | <p class="file">build.zig</p> |
| 5256 | {#header_open|build.zig#} | | |
| 5257 | {#code_begin|syntax#} | 5239 | {#code_begin|syntax#} |
| 5258 | const Builder = @import("std").build.Builder; | 5240 | const Builder = @import("std").build.Builder; |
| 5259 | | 5241 | |