The parser supports the following functions:
Abs returns an absolute value.
function Abs(X: Number): Number;
For example, abs(-2) returns 2
Frac returns the fractional part of a real number.
function Frac(X: Number): Number;
For example, Frac(123.456) = 0.456
Int returns the integer part of a real number.
function Int(X: Number): Number;
For example, Int(123.456)=123.0
Random generates random numbers within a specified range.
function Random [ ( Range: Integer) ];
If Range is not specified, the result is a real-type random number
within the range 0 <= X < 1.
Round function rounds a real-type value to an integer-type value.
function Round(X: Number): Integer;
Returns the value of X rounded to the nearest whole number.
SQR returns the square of a number.
function Sqr(X: Number): Number;
SQRT returns the square root of X.
function Sqrt(X: Number): Number;
Exp returns the value of e raised to the power of X, where e is the
base of the natural logarithms.
function Exp(X: Number): Number;
Ln returns the natural log of a real expression (Ln(e) = 1)
function Ln(X: Number): Number;
Log returns the log of a real expression.
function Log(X: Number): Number;
Note that Log(X)=Ln(X)/Ln(10)
Power is a same that ^-operator.
function Power(X, Y: Number): Number;
For example, 2^3 raises 2 to 3 and returns 8
Div returns the value of x/y rounded in the direction of zero to the
nearest integer.
function Div(X, Y: Number): Integer;
Mod returns the remainder obtained by dividing its operands.
function Mod(X, Y: Number): Integer;
In other words, x mod y = x - (x div y) * y.
Percent returns the calculated percent from value (45%).
function Percent(X, Y: Number): Integer;
For example, Percent(130, 200) returns 65
Note that the runtime error occurs when y is zero in an expression
of the form x/y, x div y, or x mod y.