Files
TDT4205/ps6/vsl_programs/ps6-codegen2/simple_and_or.vsl
T
2026-04-28 15:27:55 +02:00

34 lines
355 B
Plaintext

func main(a) {
if (a and true())
println("A")
if (a or false() or true())
println("B")
}
func true() {
println("Called true")
return 1
}
func false() {
println("Called false")
return 0
}
//TESTCASE: 1
//Called true
//A
//B
//TESTCASE: 100
//Called true
//A
//B
//TESTCASE: 0
//Called false
//Called true
//B