public override System.Object eval(System.Collections.IDictionary identifiers, IExpression lhs, IExpression rhs) { System.Object oLhs = lhs.eval(identifiers); if (oLhs == null) { return(Result.RESULT_UNKNOWN); } else if (!(oLhs is NumericValue)) { return(Result.RESULT_FALSE); } NumericValue nLhs = (NumericValue)oLhs; System.Object oRhs = rhs.eval(identifiers); if (oRhs == null) { return(Result.RESULT_UNKNOWN); } else if (!(oRhs is NumericValue)) { return(Result.RESULT_FALSE); } NumericValue nRhs = (NumericValue)oRhs; return((nLhs.doubleValue() > nRhs.doubleValue())?Result.RESULT_TRUE:Result.RESULT_FALSE); }
public override System.Object eval(IValueProvider provider, System.Object corr, IExpression lhs, IExpression rhs) { System.Object oLhs = lhs.eval(provider, corr); if (oLhs == null) { return(Result.RESULT_UNKNOWN); } else if (!(oLhs is NumericValue)) { return(Result.RESULT_FALSE); } NumericValue nLhs = (NumericValue)oLhs; System.Object oRhs = rhs.eval(provider, corr); if (oRhs == null) { return(Result.RESULT_UNKNOWN); } else if (!(oRhs is NumericValue)) { return(Result.RESULT_FALSE); } NumericValue nRhs = (NumericValue)oRhs; return((nLhs.doubleValue() == nRhs.doubleValue())?Result.RESULT_TRUE:Result.RESULT_FALSE); }
public override System.Object eval(IValueProvider provider, System.Object corr, IExpression lhs, IExpression rhs) { System.Object oRhs = rhs.eval(provider, corr); if (!(oRhs is NumericValue)) { return(Result.RESULT_UNKNOWN); } NumericValue rhsVal = (NumericValue)oRhs; return(-rhsVal.doubleValue()); }
public override System.Object eval(System.Collections.IDictionary identifiers, IExpression lhs, IExpression rhs) { System.Object oRhs = rhs.eval(identifiers); if (!(oRhs is NumericValue)) { return(Result.RESULT_UNKNOWN); } NumericValue rhsVal = (NumericValue)oRhs; return(-rhsVal.doubleValue()); }
public override System.Object eval(System.Collections.IDictionary identifiers, IExpression lhs, IExpression rhs) { System.Object oLhs = lhs.eval(identifiers); //UPGRADE_ISSUE: Class 'java.lang.Number' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javalangNumber"' if (!(oLhs is NumericValue)) { return(Result.RESULT_UNKNOWN); } //UPGRADE_ISSUE: Class 'java.lang.Number' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javalangNumber"' NumericValue lhsVal = (NumericValue)oLhs; System.Object oRhs = rhs.eval(identifiers); //UPGRADE_ISSUE: Class 'java.lang.Number' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javalangNumber"' if (!(oRhs is NumericValue)) { return(Result.RESULT_UNKNOWN); } //UPGRADE_ISSUE: Class 'java.lang.Number' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javalangNumber"' NumericValue rhsVal = (NumericValue)oRhs; //UPGRADE_ISSUE: Method 'java.lang.Number.doubleValue' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javalangNumber"' return(lhsVal.doubleValue() + rhsVal.doubleValue()); }