explicit gap_val(Obj o)
: obj(o)
{ // As we are storing an Obj in a C++ object, we need to make sure // it does not get garbage collected if(!IS_INTOBJ(o))
callGAPFunction(AddGAPObjToCacheFunction, o);
}
bool evaluate_as_boolean() const
{
abort(); // never called
}
Obj prod = ProdInt(res, INTOBJ_INT(10));
res = SumInt(INTOBJ_INT((*begin - '0')), prod);
} if(neg)
res = ProdInt(res, INTOBJ_INT(-1)); return res;
}
static std::pair<gap_val*, bool> from_str(const std::string& s)
{ if(s.find(".") != std::string::npos)
{ return from_str_double(s);
} else
{ try
{ // The following code is just designed to turn any valid // json integer into a gmp number. int loc = s.find_first_of("eE"); if(loc == std::string::npos)
{
Obj o = to_gap_int(s.c_str(), s.c_str() + s.size()); return std::make_pair(new gap_val(o), o != Fail);
}
if(s[loc+1] == '-')
{ // back to a double! return from_str_double(s);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.