Pointers volatile Alignment allowzero Sentinel-Terminated Pointers Pointers Zig has two kinds of pointers: single-item and many-item. *T - single-item pointer to exactly...
Pointers volatile Alignment allowzero Pointers Zig has two kinds of pointers: *T - pointer to exactly one item. Supports deref syntax: ptr.* [*]T - pointer to ...
unreachable Basics At Compile-Time unreachable In Debug and ReleaseSafe mode unreachable emits a call to panic with the message reached unreachable code . In ReleaseFast...
Blocks Shadowing Empty Blocks Blocks Blocks are used to limit the scope of variable declarations: test.zig test "access variable after block scope" { { ...
Slices Sentinel-Terminated Slices Slices A slice is a pointer and a length. The difference between an array and a slice is that the array’s length is part of the type and know...
C C Type Primitives Import from C Header File C Pointers Exporting a C Library Mixing Object Files C Although Zig is independent of C, and, unlike most other languages, do...
C C Type Primitives Import from C Header File C Pointers Exporting a C Library Mixing Object Files C Although Zig is independent of C, and, unlike most other languages, do...
union Tagged union extern union packed union union A bare union defines a set of possible types that a value can be as a list of fields. Only one field can be active at a ...
unreachable Basics At Compile-Time unreachable In Debug and ReleaseSafe mode, and when using zig test , unreachable emits a call to panic with the message reached unreach...