Skip to content

Parser for Math Expression with easy adding of new functions and operands. Written on Delphi XE5

License

Notifications You must be signed in to change notification settings

dimsa/DimsaMathParser

Repository files navigation

DimsaMathParser

Parser for Math Expression with easy adding of new functions and operands. Written on Delphi XE5 Парсер для математических выражений. Позволяет легко добавлять функции и операнды, полное ООП короче

Using:

Uses
 uExpressionParser;
var
 vExp: TExpression;
 vStack: TValueStack;
Begin
 vExp := TExpression.Create;
// It can parse variables too. If variables are not defined you will get exception
// Также позволяет задавать переменные. Если переменные не определены, вы получить эксепшн)
 vStack := TValueStack.Create;
 vStack.Add('big', 20);
 vStack.Add('small', 16);
 vExp.ValueStack := vStack;
 vExp := '2.5 + 4 * (5 * big-45*(8/sqrt(small)))';
// Ответ будет 42.5
 WriteLn(vExp.Value);
End.

About

Parser for Math Expression with easy adding of new functions and operands. Written on Delphi XE5

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages