TssExpressionEvaluator will evaluate mathematical expressions such as 2*PI*r*r or sqrt(a*a+b*b). It can handle parentheses, common functions and user-defined variables or constants.


Delphi 1 Yes    Delphi 2 Yes    Delphi 3 Yes    Delphi 4 Yes
Delphi 5 Yes Delphi 6 Yes Delphi 7 Yes Delphi 8 Yes
Delphi 2005 Yes Delphi 2006 Yes Delphi 2007 Yes


Abs the absolute value GradToRad* converts grads to radians
ArcCos* arc cosine in radians Log10* logarithm base 10
ArcCosD* arc cosine in radians Log2* logarithm base 2
ArcCosH* hyperbolic arc cosine Ln* natural logarithm
ArcSin* arc sine in radians Min minimum of the two arguments
ArcSinD* arc sine in degrees Max maximum of the two arguments
ArcSinH* hyperbolic arc sine Power Raise base to any power. (For fractional exponents, or |exponents| > MaxInt, base must be > 0)
ArcTan arc tangent in radians RadToDeg converts radians to degrees
ArcTanD arc tangent in degrees RadToGrad* converts radians to grads
ArcTanH* hyperbolic arc tangent Round the nearest integer value
Ceil the lowest integer greater than or equal to Secant* 1 / cos
Cos cosine in radians Sin sine in radians
CosD cosine in degrees SinD sine in degrees
Cosecant* 1 / sin SinH hyperbolic sine
CosH* hyperbolic cosine Sqr square
Cotan* cotangent in radians Sqrt square root
DegToRad converts degrees to radians Tan tangent in radians
Exp exponential TanD tangent in degrees
Floor the highest integer less than or equal to TanH hyperbolic tangent
Frac returns the fractional part Trunc removes any decimal part

* Not available with Delphi 1.


Download expeval.zip (14 KB)