code wiki / _hdl_build / _authored.nx
_authored.nx source
↩ module page · 12 lines · 323 B
1// AUTHORED BY THE NISHI BUILDER (nx_module_author) -- a validator from a spec, not hand-written
2import "nx_syscalls.nx"
3func chk(a: i64, b: i64) -> i64 {
4 if a >= 5 { if b <= 10 { return 1 } }
5 return 0
6}
7func main() -> i64 {
8 let ok: i64 = chk(7, 3)
9 if ok == 1 { sys_exit(0) }
10 sys_exit(1)
11 return 0
12}