示例#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;
}
示例#2
0
//-------------------------------------------------------------------
bool cpp_xloper::operator==(WORD e)
{
   int i;

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

   return true;
}
示例#3
0
//-------------------------------------------------------------------
bool cpp_xloper::operator==(int w)
{
   int i;

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

   return true;
}
示例#4
0
文件: xloper.cpp 项目: lemahdi/mglib
//-------------------------------------------------------------------
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;
}
示例#5
0
文件: ZZp.cpp 项目: ChristineJost/M2
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;
}
示例#6
0
//-------------------------------------------------------------------
bool cpp_xloper::GetArrayElement(DWORD offset, int &w)
{
   return coerce_to_int(GetArrayElement(offset), w);
}
示例#7
0
//-------------------------------------------------------------------
bool cpp_xloper::GetArrayElement(WORD row, WORD column, int &w)
{
   return coerce_to_int(GetArrayElement(row, column), w);
}