diff --git a/apps/calculation/app.cpp b/apps/calculation/app.cpp index eda6f520f..bb2dbda3e 100644 --- a/apps/calculation/app.cpp +++ b/apps/calculation/app.cpp @@ -95,7 +95,7 @@ bool App::textInputIsCorrect(const char * text) { return false; } Expression ansExpression = static_cast(snapshot())->calculationStore()->ansExpression(localContext()); - exp = exp.replaceSymbolWithExpression(Symbol::SpecialSymbols::Ans, ansExpression); + exp = exp.replaceSymbolWithExpression("ans", ansExpression); char buffer[Calculation::k_printedExpressionSize]; int length = PoincareHelpers::Serialize(exp, buffer, sizeof(buffer)); /* if the buffer is totally full, it is VERY likely that writeTextInBuffer diff --git a/apps/calculation/calculation.cpp b/apps/calculation/calculation.cpp index d76022f71..e41e828bf 100644 --- a/apps/calculation/calculation.cpp +++ b/apps/calculation/calculation.cpp @@ -34,7 +34,7 @@ void Calculation::reset() { void Calculation::setContent(const char * c, Context * context, Expression ansExpression) { reset(); - Expression input = Expression::parse(c).replaceSymbolWithExpression(Symbol::SpecialSymbols::Ans, ansExpression); + Expression input = Expression::parse(c).replaceSymbolWithExpression("ans", ansExpression); /* We do not store directly the text enter by the user because we do not want * to keep Ans symbol in the calculation store. */ PoincareHelpers::Serialize(input, m_inputText, sizeof(m_inputText));