Example #1
0
        public void ResetProcess(Mode mode)
        {
            currentMode = mode;
            switch (mode)
            {
            case Mode.PNumber:
                leftNumber  = new PNumber();
                rightNumber = new PNumber();
                break;

            case Mode.Fractional:
                leftNumber  = new FNumber();
                rightNumber = new FNumber();
                break;

            case Mode.Complex:
                leftNumber  = new CNumber();
                rightNumber = new CNumber();
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(mode), mode, null);
            }
            operation = Operation.None;
            function  = Function.None;
        }
Example #2
0
        public void Reset(Processor.Mode mode)
        {
            memoryState = State.Off;
            switch (mode)
            {
            case Processor.Mode.PNumber:
                number = new PNumber();
                break;

            case Processor.Mode.Fractional:
                number = new FNumber();
                break;

            case Processor.Mode.Complex:
                number = new CNumber();
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(mode), mode, null);
            }
        }