Zig cheatsheet #
- statements 不需要
;
- blocks:
{}
- comments:
//
, or//\\
for multiple lines - muable variables:
var x: i32 = 0;
- immutable variables:
const x: i32 = 0;
data types #
- integers: i8, u8, i16, u16, i32, u32, i64, u64, i128, u128
- float: f16, f32, f64, f128
- boolean:
bool
- Null:
null
- Undefined:
undefined