예제 #1
0
pgsOperand pgsString::pgs_plus(const pgsVariable &rhs) const
{
	if (rhs.is_string())
	{
		return pnew pgsString(m_data + rhs.value());
	}
	else
	{
		throw pgsArithmeticException(m_data, rhs.value());
	}
}
예제 #2
0
pgsOperand pgsString::pgs_different(const pgsVariable &rhs) const
{
	if (rhs.is_string())
	{
		return pnew pgsNumber(m_data != rhs.value() ? wxT("1") : wxT("0"));
	}
	else
	{
		throw pgsArithmeticException(m_data, rhs.value());
	}
}
예제 #3
0
pgsOperand pgsString::pgs_almost_equal(const pgsVariable &rhs) const
{
	if (rhs.is_string())
	{
		return pnew pgsNumber(m_data.CmpNoCase(rhs.value()) == 0
		                      ? wxT("1") : wxT("0"));
	}
	else
	{
		throw pgsArithmeticException(m_data, rhs.value());
	}
}