예제 #1
0
        /// <summary>
        /// Subdivides two top most values
        /// </summary>
        /// <returns>subdivision result</returns>
        public int Sub()
        {
            XInt xNumber_1      = Stack.Pop();
            XInt xNumber_2      = Stack.Pop();
            XInt xNumber_result = new XInt();

            xNumber_result.SetNumber(xNumber_1.ConvertToInt() - xNumber_2.ConvertToInt());
            Stack.Push(xNumber_result);
            return(xNumber_result.ConvertToInt());
        }
예제 #2
0
        /// <summary>
        /// Peeks the top most value
        /// </summary>
        /// <returns>peeked value</returns>
        public int Peek()
        {
            XInt xNumber = Stack.Peek();

            return(xNumber.ConvertToInt());
        }