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.1.1 Aeries: bin + doc + src (.zip 13.4 MB)

Download latest release – v.4.1.1 Aeries: bin only (.zip 4.35 MB) – separate binaries for java: 1.5, 1.6, 1.7, 1.8; .NET: 2.0, 3.0, 3.5, 4.0, 4.5, 4.6, 4.7, .NET Core, .NET Standard, .NET PCL, Xamarin.Android, Xamarin.iOS

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