From be839900419c7a74c4a46efd279d0ca16b35dc1f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 15 May 2008 23:28:07 +0000 Subject: Moved stuff into trunk. --- examples/variables.fy | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 examples/variables.fy (limited to 'examples/variables.fy') diff --git a/examples/variables.fy b/examples/variables.fy new file mode 100644 index 0000000..ac619c9 --- /dev/null +++ b/examples/variables.fy @@ -0,0 +1,21 @@ +#* + * Examples of how to define variables + *# + +# Defines the variables +my foo = 1 + 1; +my bar = 4 - 1, baz = 100 + 1, bay; + +# bay has been initialized with the default value of 0 +say bay; + +# Prints out "5\n" +assert 5 == (say foo + bar); + +# Pritns out "51101\n" +assert 51 == (put baz - 50); +assert 101 == (say baz); + +# Change the value of the variable to 99 and print it out +assert 99 == (baz = 99); +say baz; -- cgit v1.2.3