From: Doni Pracner Date: Sun, 5 Jan 2014 19:17:30 +0000 (+0100) Subject: new sample Rek1 - very simple recursion that is good for testing X-Git-Tag: v0.1.4~43 X-Git-Url: https://svarog.pmf.uns.ac.rs/gitweb/?a=commitdiff_plain;h=0cd0e9e6e9393b6008458935b0cff5916c05f491;p=mjc2wsl.git new sample Rek1 - very simple recursion that is good for testing --- diff --git a/samples/Rek1.mj b/samples/Rek1.mj new file mode 100644 index 0000000..41ab83b --- /dev/null +++ b/samples/Rek1.mj @@ -0,0 +1,11 @@ +program Rek1{ + void func(int i){ + print(i); + if (i>0) + func(i-1); + } + + void main() { + func(5); + } +} \ No newline at end of file