From 54bb80251432ff49c967115f8401e7dafc5c57d6 Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Tue, 19 Dec 2017 22:00:05 -0200 Subject: Several implementations on math expression block --- Project/MathExprParser.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Project/MathExprParser.cpp (limited to 'Project/MathExprParser.cpp') diff --git a/Project/MathExprParser.cpp b/Project/MathExprParser.cpp new file mode 100644 index 0000000..4d6e79a --- /dev/null +++ b/Project/MathExprParser.cpp @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2017 Thales Lima Oliveira + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "MathExprParser.h" + +MathExprParser::MathExprParser() +{ + AddConstant("pi", 3.14159265358979323846); + AddConstant("e", 2.71828182845904523536); +} + +MathExprParser::~MathExprParser() {} -- cgit From ff52be4e9705d443a4fde091525806322c2dc032 Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Thu, 21 Dec 2017 17:36:07 -0200 Subject: Some math expression implementations --- Project/MathExprParser.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Project/MathExprParser.cpp') diff --git a/Project/MathExprParser.cpp b/Project/MathExprParser.cpp index 4d6e79a..623cf75 100644 --- a/Project/MathExprParser.cpp +++ b/Project/MathExprParser.cpp @@ -19,8 +19,12 @@ MathExprParser::MathExprParser() { - AddConstant("pi", 3.14159265358979323846); - AddConstant("e", 2.71828182845904523536); + AddConstant("PI", 3.14159265358979323846); + AddConstant("E", 2.71828182845904523536); + AddConstant("CLOSE", 1); + AddConstant("OPEN", 0); + AddConstant("TRUE", 1); + AddConstant("FALSE", 0); } MathExprParser::~MathExprParser() {} -- cgit From dbe0b112622f8e91fa3e44a6b6e1aa7e230d3ded Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Sun, 31 Dec 2017 17:59:10 -0200 Subject: Math Expression implemented --- Project/MathExprParser.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Project/MathExprParser.cpp') diff --git a/Project/MathExprParser.cpp b/Project/MathExprParser.cpp index 623cf75..51d9382 100644 --- a/Project/MathExprParser.cpp +++ b/Project/MathExprParser.cpp @@ -19,12 +19,12 @@ MathExprParser::MathExprParser() { - AddConstant("PI", 3.14159265358979323846); - AddConstant("E", 2.71828182845904523536); - AddConstant("CLOSE", 1); - AddConstant("OPEN", 0); - AddConstant("TRUE", 1); - AddConstant("FALSE", 0); + AddConstant("pi", 3.14159265358979323846); + AddConstant("e", 2.71828182845904523536); + AddConstant("closed", 1); + AddConstant("open", 0); + AddConstant("true", 1); + AddConstant("false", 0); } MathExprParser::~MathExprParser() {} -- cgit