diff options
author | schnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2003-11-07 14:53:08 +0000 |
---|---|---|
committer | schnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2003-11-07 14:53:08 +0000 |
commit | c2b5e6cf434dac91772ab814fa8c408d50417175 (patch) | |
tree | dbaff90694f36168787a90bb7a5f19db193e32ee /src/util/Expression.c | |
parent | 8b940de7a1d3d2cf9f686e1fa151c8353d641864 (diff) |
Allow comparison operators in accumulator expressions.
Add the ! not operator to accumulator expressions.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3454 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/util/Expression.c')
-rw-r--r-- | src/util/Expression.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/Expression.c b/src/util/Expression.c index 9b6156ef..a9728878 100644 --- a/src/util/Expression.c +++ b/src/util/Expression.c @@ -109,6 +109,7 @@ static struct {"*", binary, 4,OP_TIMES}, {"^", binary, 5,OP_POWER}, /* Unary Operators - these must have the highest precedence. */ + {"!", unary, 6, OP_NOT}, {"acos", unary, 6, OP_ACOS}, {"asin", unary, 6, OP_ASIN}, {"atan", unary, 6, OP_ATAN}, @@ -998,6 +999,9 @@ static int EvaluateUnary(uExpressionValue *retval, #define EVALUATEUNARY(retval, val) \ switch(opcode) \ { \ + case OP_NOT : \ + (retval) = !(val); \ + break; \ case OP_ACOS : \ (retval) = acos(val); \ break; \ |