Example #1
0
 public Operand Eval(Operand op1, Operand op2)
 {
     return new Operand((int)op1.Value >= (int)op2.Value);
 }
Example #2
0
 public Operand Eval(Operand op1, Operand op2)
 {
     return new Operand(op1.Value.Equals(op2.Value));
 }
Example #3
0
 public Operand Eval(Operand op1, Operand op2)
 {
     return new Operand((bool)op1.Value && (bool)op2.Value);
 }
Example #4
0
 public Operand Eval(Operand op1, Operand op2)
 {
     if ((int)op2.Value == 0) throw new Exception("No se puede efectuar la division por 0");
      return new Operand((int)op1.Value / (int)op2.Value);
 }
Example #5
0
 public Operand Eval(Operand op1, Operand op2)
 {
     return new Operand(int.Parse(op1.Value.ToString()) + int.Parse(op2.Value.ToString()));
 }