src/lib/rqlEval.c 1.2
1.2 2009/12/03 18:19:28 kent
Adding integer unary minus.
Index: src/lib/rqlEval.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/rqlEval.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -B -U 4 -r1.1 -r1.2
--- src/lib/rqlEval.c 2 Dec 2009 19:09:53 -0000 1.1
+++ src/lib/rqlEval.c 3 Dec 2009 18:19:28 -0000 1.2
@@ -271,11 +271,15 @@
res.type = rqlTypeDouble;
res.val.x = res.val.b;
break;
+ /* Arithmetical negation. */
+ case rqlOpUnaryMinusInt:
+ res = rqlEvalOnRecord(p->children, record, lookup);
+ res.val.i = -res.val.i;
+ break;
case rqlOpUnaryMinusDouble:
res = rqlEvalOnRecord(p->children, record, lookup);
- res.type = rqlTypeDouble;
res.val.x = -res.val.x;
break;
default: