git-svn-id: svn://db.shs.com.ru/pip@647 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -699,8 +699,8 @@ void PIEvaluator::convert() {
|
||||
|
||||
|
||||
|
||||
const PIString & PIEvaluator::preprocess(const PIString & string) {
|
||||
static PIString ret;
|
||||
PIString PIEvaluator::preprocess(const PIString & string) {
|
||||
PIString ret;
|
||||
int lind;
|
||||
ret = prepare(string);
|
||||
convert();
|
||||
@@ -1180,6 +1180,7 @@ inline void PIEvaluator::execFunction(const PIEvaluatorTypes::Instruction & ci)
|
||||
|
||||
|
||||
inline bool PIEvaluator::execInstructions() {
|
||||
kvars = &(content.variables);
|
||||
PIEvaluatorTypes::Instruction ci;
|
||||
int oi;
|
||||
complexd tmp;
|
||||
@@ -1266,3 +1267,16 @@ complexd PIEvaluator::evaluate() {
|
||||
if (fabs(out.imag()) < 1E-300) out = complexd(out.real(), 0.);
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
PIByteArray PIEvaluator::save() const {
|
||||
PIByteArray ret;
|
||||
ret << content << elements << currentVariables << unknownVars << variables << instructions << currentString << lastError << out << correct;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void PIEvaluator::load(PIByteArray ba) {
|
||||
if (ba.size() <= 4) return;
|
||||
ba >> content >> elements >> currentVariables >> unknownVars >> variables >> instructions >> currentString >> lastError >> out >> correct;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user