Esempio n. 1
0
        public override void ExecuteInternal(RPNStack rpn, Types dataType)
        {
            int i1 = int.Parse(rpn.Pop().Token);

            if (rpn.Count < i1)
            {
                rpn.Push(i1.ToString(), Types.Integer);
                throw new ArgumentException("Too few arguments");
            }
            StackItem[] stk = new StackItem[i1];
            Array.Copy(rpn.ToArray(), rpn.Count - i1, stk, 0, i1);
            while (--i1 >= 0)
            {
                rpn.Push(stk[i1]);
            }
        }