code wiki / (root) / nx_half_test.nx

nx_half_test.nx source

↩ module page · 9 lines · 294 B

1import "nx_syscalls.nx" 2import "nx_half.nx" 3 4func main() -> nx_int { 5 if nx_half(10) != 5 { return __syscall(93, 1, 0, 0, 0, 0, 0) } 6 if nx_half(-7) != -3 { return __syscall(93, 2, 0, 0, 0, 0, 0) } 7 if nx_half(0) != 0 { return __syscall(93, 3, 0, 0, 0, 0, 0) } 8 return 0 9}