navid/haze / c0b95f8eeae4f6db6308cd4c9942340bde71175d389cc031539ebe88ded804fc / samples/baseline/02_values.hz
02_values.hz
← samples/baseline · 412 bytes · raw · download
// 02: constants, variables, integer arithmetic.
fn main() {
const a = 7
const b = 3
var total = a + b * 2
print(total) // 13
total = total - 1
print(total) // 12
total += 10
print(total) // 22
print(a / b) // 2
print(a % b) // 1
print(-a) // -7
print("done") // done
}