diff options
| author | Paul Buetow <paul@buetow.org> | 2008-05-15 23:28:07 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-05-15 23:28:07 +0000 |
| commit | be839900419c7a74c4a46efd279d0ca16b35dc1f (patch) | |
| tree | 1355c8f238d1c58ffd5cb8803bcc2adf987e79aa /examples/scopeing.fy | |
| parent | 33c945e58f86267b0d3bdca4c3421155e11eb0d9 (diff) | |
Moved stuff into trunk.
Diffstat (limited to 'examples/scopeing.fy')
| -rw-r--r-- | examples/scopeing.fy | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/examples/scopeing.fy b/examples/scopeing.fy new file mode 100644 index 0000000..2e36c2c --- /dev/null +++ b/examples/scopeing.fy @@ -0,0 +1,27 @@ +#* + * Examples of how to use scopeing + *# + +my foo = 1; + +{ + # Prints out 1 + assert 1 == (put defined foo); + + { + my bar = 2; + + # Prints out 1 + assert 1 == (put defined bar); + } + + # Prints out 0 + assert 0 == (put defined bar); + + my baz = 3; +} + +# Prints out 0 +assert 0 == (say defined bar); + + |
