コード例 #1
0
ファイル: RPNParser.cs プロジェクト: vadimostanin/GA
 public IOperand NotEqualTo(IOperand rhs)
 {
     if (!(rhs is LongOperand))
         throw new RPN_Exception("Argument invalid in LongOperand.!= : rhs");
     BoolOperand oprResult = new BoolOperand("Result");
     oprResult.Value = ((long)this.Value != (long)((Operand)rhs).Value) ? true : false;
     return oprResult;
 }
コード例 #2
0
ファイル: RPNParser.cs プロジェクト: vadimostanin/GA
 public IOperand OR(IOperand rhs)
 {
     if (!(rhs is BoolOperand))
         throw new RPN_Exception("Argument invalid in BoolOperand.|| : rhs");
     BoolOperand oprResult = new BoolOperand("Result");
     oprResult.Value = ((bool)this.Value || (bool)((Operand)rhs).Value) ? true : false;
     return oprResult;
 }