From 5c142c6d6eea8a1d1847a5fe774be4741a7ee0f3 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 29 May 2022 13:34:52 +0300 Subject: Autocommit at 29.05.2022 @ 13:34 --- src/Models/CellFormula.cpp | 2 +- src/main.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Models/CellFormula.cpp b/src/Models/CellFormula.cpp index 98e1abb..fda6ed2 100644 --- a/src/Models/CellFormula.cpp +++ b/src/Models/CellFormula.cpp @@ -48,7 +48,7 @@ double CellFormula::getNumeralValue() { String CellFormula::getValueForPrint() { for (unsigned i = 0; i < formula.get_count(); i++) - std::cout << "[" << formula[i].left->getNumeralValue() << " " << formula[i].right << std::endl; + std::cout << "[" << formula[i].left->getNumeralValue() << " " << ((formula[i].right < 0) ? (int)formula[i].right : (char)formula[i].right) << std::endl; return String() += calculate(); } diff --git a/src/main.cpp b/src/main.cpp index c5bbbae..77d9421 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,6 +6,7 @@ int main() { table.putCell(0, 1, "3"); table.putCell(0, 2, "String"); table.putCell(0, 3, "= 3 * R0C1 + R0C0 ^ R0C1 * 9 - 10 + 1"); + // table.putCell(0, 3, "= 1 + 2 * 3 + 4 + 5"); UserInterface ui(&table); ui.run(); } -- cgit v1.3.1-26-gb76a