----------------------------------------
Advanced Calculator v4.0 for Delphi
Copyright 1999 by George Barbakadze
All rights reserved
http://adcalc.homepage.com
[email protected]
----------------------------------------
Compatible with Delphi4, Delphi5
The fast expression evaluator which can be used to evaluate mathematical
expressions at run time. There is no restriction in depth or
complexity of expression. Saves in file and loades from file a
library of registered variables and functions. Supports complete
error handling.
1. Expression can contain:
Arithmetical operations ( +, -, *, /, ^, (...) );
Comparison operations ( >, <, =, <>, >=, <= );
Logical operators (And, Or);
More than 20 standard functions of Extended or Real type;
Unlimited number of user-defined variables and functions declared at
design-time and at run-time, no restriction in an amount of
variables and functions and their parameters.
2. Default functions
Functions of EXTENDED or REAL type:
Frac, Int, Round, Exp, Log, Ln,
Sin, Cos, ArcSin, ArcCos, Sinh, Cosh, ArcSinh, ArcCosh,
Tan, CoTan, ArcTan, ArcTanh, Tanh,
Sqr, Sqrt, Abs.
Ranges of these functions in full likeness with the Delphi same
name functions.
Function If(logical_test, value_if_true, value_if_false)
Logical_test - is any value or expression that can be evaluated
to TRUE or FALSE.
Value_if_true - is the value or expression that is returned if
logical_test is True.
Value_if_false - is the value or expression that is returned if
logical_test is False.
Function Not(logical_value) returns opposite value of boolean type.
3. Aditional tools (NEW)
It is possible to evaluate a text box of expressions, appropriating
significances of unlimited amount of variables.
It is possible to organize connection between variables of your
program (global or local) and variables AdCalc so that appropriating
significance by one from them, was reflected in other.
In a text box of expression it is possible to use the sign "//" for
comments.
4. Codes and messages of error
1. Line is Long (Maximum length of identifier is 64 character);
2. Numerical expression expected;
3. Boolean expression expected;
4. Arithmetical sign expected;
5. Comparison sign expected;
6. "AND" or "OR" expected;
7. "(" expected;
8. ")" expected;
9. "," expected;
10. Division by zero;
11. The parameter is out of range;
12. Variable name expected;
13. "=" expected;
14. ";" or "End" expected.
5. Installation
To use this component in your applications:
Copy the following files into a directory of your choice:
1) AdCReg.pas
2) AdCReg.dcr
3) AdCalc.pas or AdCalc.dcu
Then:
Component/Install Component/Browse/AdCReg.pas/Ok/Compile
6. What's new
version 3.01.
In the event OnError and procedures GetExtendedResult and GetBooleanResult,
is added the parameter "Handle", which specifies the expression - of
source of en error.
version 3.02.
To kinds of errors is added the code 11 - "The parameter is out of range".
This error arises when calling of formal parameter of function, where
number of parameter is out of range.
Current version 3.1.
Evaluating a text box of expressions, appropriating significances of
unlimited amount of variables and accordingly additional error messages.
Version 3.2.
Connections between variables of your program and variables AdCalc;
The sign "//" for comments;
Descriptions for variables and functions.
Current version 4.0.
Increase of a velocity of the analyzer in cyclical evaluations of a
formula with the help of preliminary compilation of expression.