コード例 #1
0
            protected internal override void Clr(CalculatorContext context, Stack <string> stack)
            {
                CalculatorController ctxt = context.Owner;

                if (stack.Count >= 1)
                {
                    CalculatorControllerState endState = context.State;

                    context.ClearState();

                    try
                    {
                        ctxt.Clr();
                    }
                    finally
                    {
                        context.State = endState;
                    }
                }
                else
                {
                    context.State.Exit(context);
                    context.State = Map1.ErrorEmpty;
                    context.State.Entry(context);
                }

                return;
            }