#include "OperandStack.h"


OperandStack::OperandStack(void):m_top(-1)
{
}


OperandStack::~OperandStack(void)
{
}


void OperandStack::push(Complex data)
{
    if (m_top<99)
        m_data[++m_top] = data;
}


int OperandStack::pop(Complex & data)
{
    if (m_top >= 0)
    {
        data = m_data[m_top--];
        return 1;
    }
    return 0;
}
