예제 #1
0
파일: Command.cs 프로젝트: menees/RpnCalc
        internal void PushResults(CommandState state, params Value[] valuesToPush)
        {
            // Make sure we have no double or complex values that
            // use #INF or #NaN.  Also, do value type reduction if it
            // will cause no "significant" data loss.
            var actualValuesToPush = ValidateAndReduce(valuesToPush);

            ValueStack stack = this.calc.Stack;

            if (this.topValuesUsedCount > 0)
            {
                this.lastArgs = stack.PopRange(this.topValuesUsedCount);
            }

            stack.PushRange(actualValuesToPush);

            this.state = state;
        }