diff --git a/examples/test_mul_fixed.slg b/examples/test_mul_fixed.slg new file mode 100644 index 0000000..d221ea7 --- /dev/null +++ b/examples/test_mul_fixed.slg @@ -0,0 +1,22 @@ +fn print(msg: string) #[builtin(Print)] {} +fn println(msg: string) { print(msg + "\n") } + +fn mul(left: int, right: int) -> int { + if left == 0 or right == 0 { + 0 + } else { + left * right + } +} + +fn main() { + if mul(10,2) == 20 { + println("test 1 passed") + } + if mul(3,2) == 6 { + println("test 2 passed") + } + if mul(0,2) == 0 { + println("test 3 passed") + } +} diff --git a/usecase_dos.odt b/usecase_dos.odt new file mode 100644 index 0000000..570722c Binary files /dev/null and b/usecase_dos.odt differ