Esempio n. 1
0
//-------------------------------------------------------------------
// Change the type and assign the given value
//-------------------------------------------------------------------
cpp_xloper::operator int(void)
{
   int i;

   if(coerce_to_int(&m_Op, i))
      return i;

   return 0;
}
Esempio n. 2
0
//-------------------------------------------------------------------
bool cpp_xloper::operator==(WORD e)
{
   int i;

   if(!coerce_to_int(&m_Op, i) || (WORD)i != e)
      return false;

   return true;
}
Esempio n. 3
0
//-------------------------------------------------------------------
bool cpp_xloper::operator==(int w)
{
   int i;

   if(!coerce_to_int(&m_Op, i) || i != w)
      return false;

   return true;
}
Esempio n. 4
0
//-------------------------------------------------------------------
bool coerce_to_short(const xloper *p_op, short &s)
{
	int i;
	if(!coerce_to_int(p_op, i))
		return false;

	s = (short)i;
	return true;
}
Esempio n. 5
0
bool Z_mod::lift(const Ring *Rg, const ring_elem f, ring_elem &result) const
{
  // Rg = Z ---> Z/p
  if (Rg == globalZZ)
    {
      result = Rg->from_int(coerce_to_int(f));
      return true;
    }
  return false;
}
Esempio n. 6
0
//-------------------------------------------------------------------
bool cpp_xloper::GetArrayElement(DWORD offset, int &w)
{
   return coerce_to_int(GetArrayElement(offset), w);
}
Esempio n. 7
0
//-------------------------------------------------------------------
bool cpp_xloper::GetArrayElement(WORD row, WORD column, int &w)
{
   return coerce_to_int(GetArrayElement(row, column), w);
}