//------------------------------------------------------------------- // 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; }
//------------------------------------------------------------------- bool cpp_xloper::operator==(WORD e) { int i; if(!coerce_to_int(&m_Op, i) || (WORD)i != e) return false; return true; }
//------------------------------------------------------------------- bool cpp_xloper::operator==(int w) { int i; if(!coerce_to_int(&m_Op, i) || i != w) return false; return true; }
//------------------------------------------------------------------- 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; }
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; }
//------------------------------------------------------------------- bool cpp_xloper::GetArrayElement(DWORD offset, int &w) { return coerce_to_int(GetArrayElement(offset), w); }
//------------------------------------------------------------------- bool cpp_xloper::GetArrayElement(WORD row, WORD column, int &w) { return coerce_to_int(GetArrayElement(row, column), w); }