X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=examples%2FStmtEx.spl;h=d52e5b72a679e6673cf6f2264878b2563d8cf8f5;hb=1c2e08dc9d18c9ffb2b26ef936a407a813e4822e;hp=1e1d4fe89930ce26f256821d809f9c0d29488881;hpb=3bf5967ddf63e4d616d7ffd905151a1cbd71eeef;p=cc1516.git diff --git a/examples/StmtEx.spl b/examples/StmtEx.spl index 1e1d4fe..d52e5b7 100644 --- a/examples/StmtEx.spl +++ b/examples/StmtEx.spl @@ -3,6 +3,8 @@ var y = 3; var z = 3 + y; Int a = facR(4); //Int b = test(3); +var f = beep(); +var n = True; facR(n) :: Int -> Int { test(3); @@ -14,10 +16,18 @@ facR(n) :: Int -> Int { return 5; } -test(n) :: Int -> Int { +test(n) :: Int -> Bool { var i = 0; - facR(2); - while (z < 3) { - return 3; + facR(z); + while (n < 3) { + return True; } +} + +beep() { + boop(); +} + +boop() { + beep(); } \ No newline at end of file