diff options
| author | admin (centauri.fritz.box) <puppet@mx.buetow.org> | 2014-06-30 23:53:04 +0200 |
|---|---|---|
| committer | admin (centauri.fritz.box) <puppet@mx.buetow.org> | 2014-06-30 23:53:04 +0200 |
| commit | adc4b59a3e7c9db6f33670164490830d87331228 (patch) | |
| tree | adc5d21856852bfb5c3cca794a9c07ad476d877e /examples/bitwise.fy | |
| parent | 63cf3028445d8d213ffc774f77aafd7283cb4fbd (diff) | |
| parent | 5ab5de91eb0ae6ed9db78a2c8c47ec67f105e504 (diff) | |
Mergebuild-010393-lambda
Diffstat (limited to 'examples/bitwise.fy')
| -rw-r--r-- | examples/bitwise.fy | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/examples/bitwise.fy b/examples/bitwise.fy deleted file mode 100644 index 03fda6c..0000000 --- a/examples/bitwise.fy +++ /dev/null @@ -1,32 +0,0 @@ -#* - * Examples of how to use bitwise operators - *# - -# Prints "01\n" -assert 0 == (put 1 and 0); -assert 1 == (say 1 and 1); - -# Prints "01\n" -assert 0 == (put 0 or 0); -assert 1 == (say 0 or 1); - -# Prints "01\n" -assert 0 == (put 1 xor 1); -assert 1 == (say 1 xor 0); - -# Prints "82\n" -assert 8 == (put 2 :< 2); -assert 2 == (say 8 :> 2); - -# A bit more complex, prints "9\n" -assert 9 == (say 1 :< 5 :> 5 or 2 and 5 xor 8); - -# Same result, but with parenthesis: -assert 9 == (say ((((1 :< 5) :> 5) or 2) and 5) xor 8); - -# Different parenthesis, different result: "1\n" -assert 1 == (say 1 :< 5 :> 5 or 2 and (5 xor 8)); - -# Prints "-1" -assert (neg 1) == (say neg not 0); - |
