Files
TDT4205/ps3/vsl_programs/ps3-simplify/constant-fold.vsl
2026-02-23 17:25:27 +01:00

27 lines
379 B
Plaintext

func main() {
print(3 + 5)
print(3 - -6)
print(20 * 4)
print(111 / 11)
print(50 and 10)
print(0 or 20)
print(0 and 1)
print(1 ? 5 : 7)
print(0 ? 20 : 30)
return other()
}
func other() {
var x
x = !5 == !6
x = !(5 != 6)
x = 10 < 10
x = 10 <= 10
x = 10 > 10
x = 10 >= 10
x = 40 + 20 + x * 2
return x
}