|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Want a new Job?
Chapters
Services
Feature Zones
|
Introduction
BackgroundThe basic idea of this code is parsing the Using the CodeUsing the code is pretty simple. For basic use, developers should call the MathFunctions.MathParser mp = new MathFunctions.MathParser();
decimal result = mp.Calculate("5/(1-2)+(3+(2/1))");
For parametric use, developers should declare parameters before calling the MathFunctions.MathParser mp = new MathFunctions.MathParser();
mp.Parameters.Add(MathFunctions.Parameters.A, 5);
mp.Parameters.Add(MathFunctions.Parameters.B, 2);
mp.Parameters.Add(MathFunctions.Parameters.C, 1);
mp.Parameters.Add(MathFunctions.Parameters.D, 3);
decimal result = mp.Calculate("3D-2B/C+(A-B)");
History
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||