xpressn.c, drop '&' and '|' operators, (we have '&&' and '||')
This commit is contained in:
parent
719b5e5c20
commit
a855a19d2c
|
|
@ -965,10 +965,10 @@ fetchoperator(tdico *dico,
|
||||||
} else if (cpos(c, "=<>#GL") >= 0) {
|
} else if (cpos(c, "=<>#GL") >= 0) {
|
||||||
state = S_binop;
|
state = S_binop;
|
||||||
level = 5;
|
level = 5;
|
||||||
} else if (c == '&' || c == 'A') {
|
} else if (c == 'A') {
|
||||||
state = S_binop;
|
state = S_binop;
|
||||||
level = 6;
|
level = 6;
|
||||||
} else if (c == '|' || c == 'O') {
|
} else if (c == 'O') {
|
||||||
state = S_binop;
|
state = S_binop;
|
||||||
level = 7;
|
level = 7;
|
||||||
} else if (c == '!') {
|
} else if (c == '!') {
|
||||||
|
|
@ -1089,14 +1089,6 @@ operate(char op, double x, double y)
|
||||||
case 'O': /* || */
|
case 'O': /* || */
|
||||||
x = ((x != 0.0) || (y != 0.0)) ? 1.0 : 0.0;
|
x = ((x != 0.0) || (y != 0.0)) ? 1.0 : 0.0;
|
||||||
break;
|
break;
|
||||||
case '&':
|
|
||||||
if (y < x)
|
|
||||||
x = y; /*=Min*/
|
|
||||||
break;
|
|
||||||
case '|':
|
|
||||||
if (y > x)
|
|
||||||
x = y; /*=Max*/
|
|
||||||
break;
|
|
||||||
case '=':
|
case '=':
|
||||||
if (x == y)
|
if (x == y)
|
||||||
x = u;
|
x = u;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue