jCalc/Calculator.xaml.cs
/// <summary>
/// Apply pending operation with num and update currentResult
/// </summary>
/// <param name="num">Value to apply to current pending Operation</param>
Apply pending operation with num and update currentResult
Apply pending operation with num and update currentResult
private void Process(double num)
        {
            switch (pendingOperation)
            {
                case Operation.NONE:  { currentResult  = num; break; }
                case Operation.PLUS:  { currentResult += num; break; }
                case Operation.MINUS: { currentResult -= num; break; }
                case Operation.MULT:  { currentResult *= num; break; }
                case Operation.DIV:   { currentResult /= num; break; }
            }
        }
private void Process ( double num ) { switch ( pendingOperation ) { case Operation . NONE : { currentResult = num ; break ; } case Operation . PLUS : { currentResult += num ; break ; } case Operation . MINUS : { currentResult -= num ; break ; } case Operation . MULT : { currentResult *= num ; break ; } case Operation . DIV : { currentResult /= num ; break ; } } }
Apply pending operation with num and update currentResult
Apply pending operation with num and update currentResult
num
double
Value to apply to current pending Operation
Value to apply to current pending Operation