diff options
Diffstat (limited to 'tutorial/task9.mu')
-rw-r--r-- | tutorial/task9.mu | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tutorial/task9.mu b/tutorial/task9.mu new file mode 100644 index 00000000..427c420b --- /dev/null +++ b/tutorial/task9.mu @@ -0,0 +1,22 @@ +fn f -> _/eax: int { + return 2 +} + +fn g -> _/eax: int { + return 3 +} + +fn add-f-and-g -> _/eax: int { + var x/eax: int <- f + var y/eax: int <- g + x <- add y + return x +} + +fn test-add-f-and-g { + var result/eax: int <- add-f-and-g + check-ints-equal result, 5, "F - test-add-f-and-g\n" +} + +fn main { +} |