diff options
| author | Paul Buetow <paul@buetow.org> | 2008-11-04 20:42:29 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-11-04 20:42:29 +0000 |
| commit | 48cf82bfc6cd65cc95f7658582fc532602a85ac0 (patch) | |
| tree | 97642dad8f06c1d2a666b6903e4275fb07242785 /tmp/test.fy | |
| parent | 71f02b4a701b6fb5f54950ef9925672b8c608211 (diff) | |
few more make fules.
Diffstat (limited to 'tmp/test.fy')
| -rw-r--r-- | tmp/test.fy | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/tmp/test.fy b/tmp/test.fy index 3ffb105..609f0c2 100644 --- a/tmp/test.fy +++ b/tmp/test.fy @@ -1,32 +1,8 @@ #* - * Examples of how to use synonyms + * Examples of how to use references *# -# Create a variable foo, and bar is a synonym for foo +# Create a variable foo, and bar is a reference to foo my foo = "foo"; -my bar = \foo; - -# Reset the value of foo -foo = "bar"; - -# The synonym variable should now also set to "bar" -assert "bar" == say bar; - -# Create a new procedure baz -proc baz { - say "I am baz"; -} - -# Make a synonym baz, and undefine baz -my bay = \baz; -undef baz; - -# bay still has a reference of the original procedure baz -bay; # this prints aut "I am baz" - -assert 0 == defined baz; -assert 1 == defined bay; - -# This removes the procedure from memory -undef bay; +my bar = &foo; |
