You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Try to run this code:
mup::ParserX parser(mup::pckCOMMON | mup::pckNON_COMPLEX | mup::pckMATRIX |
mup::pckUNIT);
mup::Value value2{3, 0};
mup::Variable variable2{&value2};
parser.DefineVar("v2", variable2);
parser.SetExpr("v2[0]*v2[0], v2[1]*v2[1], v2[2]*v2[2]");
try {
const auto& temp = parser.Eval();
} catch(mup::ParserError &e) {
cout << e.GetMsg() << endl;
}
What is the expected output?
No exception.
What do you see instead?
Exception: Unexpected comma found at position 11.
What version of the product are you using?
3.0.1, macosx
If this is indeed supported the documentation does not mention it:
https://code.google.com/p/muparserx/wiki/Using
I tried Eval(int) but that gave a compilation error:
error: no matching function for call to 'mup::ParserX::Eval(int&)'
note: candidate is:
const mup::IValue& mup::ParserXBase::Eval() const
Original issue reported on code.google.com by ilja.j.h...@nasa.gov on 8 Jul 2014 at 5:02
The text was updated successfully, but these errors were encountered:
This is no longer supported. You can now use the new array constructor {.. ,
.., ..}:
parser.SetExpr("{v2[0]*v2[0], v2[1]*v2[1], v2[2]*v2[2]}");
This will create an array containing all results.
Original comment by ib...@gmx.info on 9 Jul 2014 at 7:18
Original issue reported on code.google.com by
ilja.j.h...@nasa.gov
on 8 Jul 2014 at 5:02The text was updated successfully, but these errors were encountered: