Labelled Blocks
Blocks in Zig are expressions and can be given labels, which are used to yield
values. Here, we are using a label called blk
. Blocks yield values, meaning
they can be used in place of a value. The value of an empty block {}
is a
value of the type void
.
This can be seen as being equivalent to C’s i++
.