示例#1
0
 private IObject DoOperand(IObject leftSide, char operand, IObject rightSide)
 {
     if (operand == '+')
     {
         return(leftSide.PlusOperator(rightSide));
     }
     else if (operand == '-')
     {
         return(leftSide.MinusOperator(rightSide));
     }
     else if (operand == '*')
     {
         return(leftSide.MultiplierOperator(rightSide));
     }
     else if (operand == '/')
     {
         return(leftSide.DividerOperator(rightSide));
     }
     else if (operand == '^')
     {
         return(leftSide.PowerOperator(rightSide));
     }
     else
     {
         return(new IObject());
     }
 }
示例#2
0
 private IObject DoOperand(IObject leftSide, string operand, IObject rightSide)
 {
     if (operand == "+")
     {
         return(leftSide.PlusOperator(rightSide));
     }
     else if (operand == "-")
     {
         return(leftSide.MinusOperator(rightSide));
     }
     else if (operand == "*")
     {
         return(leftSide.MultiplierOperator(rightSide));
     }
     else if (operand == "/")
     {
         return(leftSide.DividerOperator(rightSide));
     }
     else if (operand == "^")
     {
         return(leftSide.PowerOperator(rightSide));
     }
     else
     {
         return(new IObject());
     }
 }
示例#3
0
 private IObject DoOperand(IObject leftSide, char operand, IObject rightSide)
 {
     if (operand == '+')
         return leftSide.PlusOperator(rightSide);
     else if (operand == '-')
         return leftSide.MinusOperator(rightSide);
     else if (operand == '*')
         return leftSide.MultiplierOperator(rightSide);
     else if (operand == '/')
         return leftSide.DividerOperator(rightSide);
     else if (operand == '^')
         return leftSide.PowerOperator(rightSide);
     else
         return new IObject();
 }
示例#4
0
 private IObject DoOperand(IObject leftSide, string operand, IObject rightSide)
 {
     if (operand == "+")
         return leftSide.PlusOperator(rightSide);
     else if (operand == "-")
         return leftSide.MinusOperator(rightSide);
     else if (operand == "*")
         return leftSide.MultiplierOperator(rightSide);
     else if (operand == "/")
         return leftSide.DividerOperator(rightSide);
     else if (operand == "^")
         return leftSide.PowerOperator(rightSide);
     else
         return new IObject();
 }