diff options
| author | Paul Buetow <paul@buetow.org> | 2008-08-25 18:48:28 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-08-25 18:48:28 +0000 |
| commit | ec9899c0399f42473d311c7d0a46769d3d933c06 (patch) | |
| tree | 8396b366b5e1b665f60f5502d484985b0950a94e /examples | |
| parent | cf9029ee902eda028f3efcb77e8c2aed25205b94 (diff) | |
bugs fixed, initial array
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/broken/bitwise.fy | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/examples/broken/bitwise.fy b/examples/broken/bitwise.fy index b124590..03fda6c 100644 --- a/examples/broken/bitwise.fy +++ b/examples/broken/bitwise.fy @@ -14,18 +14,19 @@ assert 1 == (say 0 or 1); assert 0 == (put 1 xor 1); assert 1 == (say 1 xor 0); -# Prints "-1" (see "not" operator of NASM why so) -assert (neg 1) == (say not 0); - # Prints "82\n" -assert 8 == (put 2 << 2); -assert 2 == (say 8 >> 2); +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); +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); +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)); +assert 1 == (say 1 :< 5 :> 5 or 2 and (5 xor 8)); + +# Prints "-1" +assert (neg 1) == (say neg not 0); + |
