C++ Mathematical Expression Library (ExprTk) https://www.partow.net/programming/exprtk/index.html
This commit is contained in:
parent
b5ec0fec2d
commit
b37321d094
|
@ -885,11 +885,14 @@ version using ExprTk:
|
||||||
foo.register_symbol_table(symbol_table);
|
foo.register_symbol_table(symbol_table);
|
||||||
|
|
||||||
parser_t parser;
|
parser_t parser;
|
||||||
if (parser.compile(foo_str,foo))
|
if (!parser.compile(foo_str,foo))
|
||||||
{
|
{
|
||||||
foo.value();
|
// Error in expression...
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
T result = foo.value();
|
||||||
|
|
||||||
|
|
||||||
(3) Parser
|
(3) Parser
|
||||||
A component which takes as input a string representation of an
|
A component which takes as input a string representation of an
|
||||||
|
|
Loading…
Reference in New Issue