From 9bf07e1dfa69b5d6e4c296c0690b5ed91f909b7b Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 26 Aug 2008 08:17:55 +0000 Subject: added v0.1 branch --- examples/inlinefunctions.fy | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 examples/inlinefunctions.fy (limited to 'examples/inlinefunctions.fy') diff --git a/examples/inlinefunctions.fy b/examples/inlinefunctions.fy new file mode 100644 index 0000000..81848ce --- /dev/null +++ b/examples/inlinefunctions.fy @@ -0,0 +1,20 @@ +#* + * Simple builtin function tests + *# + +# Print "-20\n" +assert (neg 20) == (say neg 20); + +# Print "30\n" +assert 30 == (say 10 - neg 20); + +# Print "-30\n" +assert (neg 30) == (say neg neg neg 10 - neg 20); + +# Print "Hello\n" +put "Hello"; +ln; + +# Exit with exit code 0 +exit 10 + 10 - 5 - 15; + -- cgit v1.2.3