User defined constants

MathParser.org - mXparser - logo - Tutorial

*** If you found the software useful donation is something you might consider 🙂 ***

If you found the software useful donation is something you might consider :-)

JAVA code

Case 1: User defined constants definition

import org.mariuszgromada.math.mxparser.*;
...
Constant a = new Constant("a", 5);
Constant b = new Constant("b = 10");		
Expression e = new Expression("a+b", a, b);

mXparser.consolePrintln(a.getConstantName() + " = " + a.getConstantValue());
mXparser.consolePrintln(b.getConstantName() + " = " + b.getConstantValue());
mXparser.consolePrintln("Res: " + e.getExpressionString() + " = " + e.calculate());
Res: a+b = 15.0
a = 5.0
b = 10.0

*** If you found the software useful donation is something you might consider 🙂 ***

If you found the software useful donation is something you might consider :-)

Enjoy! 🙂

 

Best regards,

Mariusz Gromada

Download latest release – v.4.4.0 Gemoni: bin + doc + src (.zip 12.2 MB)

Download latest release – v.4.4.0 Gemoni: bin only (.zip 10 MB): includes separate binaries for various .NET platforms and Java versions

Source code .zipSource code .tar.gz View on GitHubMathSpace.pl