Exemple #1
0
        public override int execute(int count)
        {
            MyInteger num1 = new MyInteger(stack.pop());
            MyInteger num2 = new MyInteger(stack.pop());

            stack.push(num1 + num2);
            return(count + 1);
        }
Exemple #2
0
        public override int execute(int count)
        {
            MyInteger num1 = new MyInteger(stack.pop());
            MyInteger num2 = new MyInteger(stack.pop());

            if (num1.value.Equals(num2.value))
            {
                stack.push(new MyType(true));
            }
            else
            {
                stack.push(new MyType(false));
            }
            return(count + 1);
        }