| Section | Title |
|---|---|
| 1 | Names and Declarations |
| 2 | const and var |
| 3 | Integer Types |
| 4 | Floating-Point Types |
| 5 | Booleans |
| 6 | Characters and Bytes |
| 7 | Type Inference |
| 8 | Explicit Casts |
| 9 | Exercises |
Names and DeclarationsA Zig program is made from declarations.
`const` and `var`Zig has two kinds of variable declarations:
Integer TypesZig has signed and unsigned integer types.
Floating-Point TypesZig has floating-point types for numbers with fractional parts.
BooleansA boolean value is either true or false.
Characters and BytesZig does not have a separate character type for ordinary strings.
Type InferenceA declaration may name its type explicitly.
Explicit CastsZig does not perform most numeric conversions automatically.
ExercisesThis chapter introduced the basic forms of values and declarations: names, constants, variables, integer types, floating-point types, booleans, bytes, inferred types, and...