AdCalc unit

Advanced Calculator v5.15

Compatible with Delphi 4/5/6

Requires the components DList v1.33 and Reader v3.0 or later versions

Components

TAdCalc

Types

PStrValue

TCommentSign

TErrorEvent

TExprType

TFunctErrorEvent

TFunctListEvent

TFunctParamValues

TGetBooleanFunctEvent

TGetBooleanVarEvent

TGetDateTimeFunctEvent

TGetDateTimeVarEvent

TGetExtendedFunctEvent

TGetExtendedVarEvent

TGetIntegerFunctEvent

TGetIntegerVarEvent

TGetStringFunctEvent

TGetStringVarEvent

TPriorityVar

TStringSign

TVarListEvent


TAdCalc component

Properties	Methods	Events

Unit

AdCalc

Advanced Calculator v5.15

Compatible with Delphi 4/5/6

Requires the components DList v1.33 and Reader v3.0 or later versions

Description

A fast run-time expression evaluator manipulating on 5 type.

1. Features

•	5 base type - Integer, Extended, Boolean, String, DateTime;

•	High speed (5 000 - 15 000 evaluations per sec. on 600mhz CPU);

•	Arithmetic operators ( +, -, *, /, Div, Mod, ^ );

•	Comparison operators ( >, <, =, <>, >=, <= ) for all types;

•	Logical operators for boolean types (And, Or, Xor);

•	Multilevel If - Then - Else statement;

•	47 build in functions;

•	Unlimited amount of On-Event evaluated functions and variables;

•	Unlimited amount of run-time defined functions and variables;

•	Declaration of functions with or without parameters;

•	Pseudo compilation of text for fast repeated evaluation;

•	Scientific floating point notations ( 1.2e-3 );

•	Full error handling;

•	Comments in a text of expression;

•	Customizable String/Comment signs;

•	Denotation of two StringSignes in string as one sign;

•	Multilevel calling of subexpressions in evaluated On-Events;

•	Saving library of variables and functions in a file;

•	Initialization of variables using expressions in one text box;

•	Links between variables of application and run-time variables of component;

•	Full help and demo.

The "And", "Or" and "Xor" operators can be used only for values of Boolean type, Therefore their priority less than priority of comparison symbols. For example: expression 10>3 and 5>3 uniformly with expression (10>3) and (5>3).

2. Predefined functions

Functions of Integer type:

DayOfWeek, Pos, Length, Round, StrToInt.

Functions of Extended and Real type:

Iff, Frac, Int, Exp, Log, Ln, Sin, Cos, ArcSin, ArcCos, Sinh, Cosh, ArcSinh, ArcCosh, Tan, CoTan, ArcTan, Tanh, ArcTanh, Sqr, Sqrt, Abs, StrToFloat.

Function of Boolean type:

Not, IsLeapYear.

Functions of String type:

LowerCase, AnsiLowerCase, UpperCase, AnsiApperCase, Copy, IntToStr, FloatToStr, DateTimeToStr, TimeToStr, DateToStr, FormatDateTime.

Functions of DateTime (TDateTime) type:

EncodeDate, EncodeTime, IncMonth, StrToDate, StrToDateTime, StrToTime.

Ranges of these functions in full likeness with the same name functions of Delphi.

3.  Error Codes and Descriptions

0. No error;

1. Integer type value expected;

2. Extended type value expected;

3. Boolean type value expected;

4. String type value expected;

5. DateTime type value expected;

6. "+", "-", "*", "Div" or "Mod" expected;    (for integer type)

7. "+", "-", "*", "/" or "^" expected;            (for Extended and DateTime types)

8. "AND", "OR" or "XOR" expected;          (for boolean type)

9. "+" expected;                                      (for string type)

10. Comparison sign expected;

11. "(" expected;

12. ")" expected;

13. "," expected;

14. Division by zero;

15. Number of parameter is out of range;

16. Variable name expected;

17. "=" expected;

18. ";" or "." expected;

19. "." expected;

20. "Then" expected;

21. "Else" expected;

22. Invalid Integer;

23. Invalid Floating Point Number;

24. Invalid Date;

25. Invalid Time;

26. Invalid Date and Time;

27. String sign expected.

4. Installation

Copy the following files in your AdCalc directory

1) AdCReg.pas

2) AdCReg.dcr

3) AdCalc.pas or AdCalc.dcu

4) AdCMsg.pas

This component requires components: Dynamic List v1.33 and Text Reader v3.0, but if You do not require this components separately, You can only copy the following units in your AdCalc directory:

1) DList.pas or DList.dcu;

2) Reader.pas or Reader.dcu.

Then install component AdCalc -

Component / Install Component / Browse / AdCReg.pas / Ok / Compile.

Make sure that path of your AdCalc directory is indicated in -

Tools / Environment Options / Library / Library path.

5. History

v3.01

In the event OnError and procedures GetExtendedResult and GetBooleanResult is added the parameter "Handle", which specifies the expression, where error was occured.

3.02

Is added error code 11 - "The parameter is out of range".

This error arises when calling of formal parameter of run-time function, where

number of parameter is out of range.

v3.1

Evaluation of text box of expressions, assigning values of

unlimited amount of variables;

accordingly additional error messages.

v3.2

Connections between variables of application and run-time variables of AdCalc;

Comments in a text of expression;

Descriptions for variables and functions.

v4.0

Acceleration of cyclic evaluations by preliminary pseudo compilation of expression.

v4.1

Is added the new base type - STRING.

v5.0

Is added two base types - Integer and DateTime.

Component has become to use units DList and Reader and evaluation has become faster on 50%.

v5.1

Multilevel If - Then - Else statement.

v5.11

Declaration of run-time functions without parameters.

v5.12

Fixing of some bugs;

Additional codes of error handling.

v5.13

Case sensitivity for Displaying names of variables and functions.

v5.14

Acceleration of evaluation of predefined functions on 30%.

v5.15

New properties: CommentSign, StringSign, CaseSensitivity;

Denotation of two StringSignes in string as one sign.


TAdCalc - Properties
Properties

 Key properties

CaseSensitivity

CommentSign

StringSign


TAdCalc - Methods
Methods

 Key methods

ConnectBooleanVar

ConnectDateTimeVar

ConnectExtendedVar

ConnectIntegerVar

ConnectStringVar

ExecuteBlock

ExecuteBoolean

ExecuteDateTime

ExecuteExtended

ExecuteInteger

ExecuteString

GetBlockResult

GetBooleanResult

GetBooleanVarValue

GetDateTimeResult

GetDateTimeVarValue

GetExtendedResult

GetExtendedVarValue

GetFunctDescription

GetFunctProperties

GetIntegerResult

GetIntegerVarValue

GetStringResult

GetStringVarValue

GetVarDescription

GetVarProperties

RemoveVar

SetBooleanVarValue

SetDateTimeVarValue

SetExtendedVarValue

SetFunctDescription

SetIntegerVarValue

SetStringVarValue

SetVarDescription

AddText

ClearExpressions

ClearFunctions

ClearVariables

DefineFunction

DisconnectVar

GetFunctList

GetVarList

LoadLibrary

RegFunction

RegVariable

RemoveFunct

RemoveText

SaveLibrary


TAdCalc - Events
Events

 Key events

OnError

OnFunctError

OnFunctList

OnGetBooleanFunct

OnGetBooleanVar

OnGetDateTimeFunct

OnGetDateTimeVar

OnGetExtendedFunct

OnGetExtendedVar

OnGetIntegerFunct

OnGetIntegerVar

OnGetStringFunct

OnGetStringVar

OnVarList


CaseSensitivity property

Applies to

TAdCalc component

Declaration

property CaseSensitivity: boolean;

Description

Determines Case Sensitivity of evaluator.

Note

The change of this property clears all registered Functions and Variables and they should be registered again.


CommentSign property

See also

Applies to

TAdCalc component

Declaration

property CommentSign: TCommentSign;

Description

Assigns sign for comments.


CommentSign property - See also
See also

StringSign property


StringSign property

See also

Applies to

TAdCalc component

Declaration

property StringSign: TStringSign;

Description

Assigns sign for string.

It is possible to use two StringSignes in strings as one sign.


StringSign property - See also
See also

CommentSign property


ConnectBooleanVar method

See also

Applies to

TAdCalc component

Declaration

function ConnectBooleanVar(VName: string; var Variable: boolean; PriorityVar: TPriorityVar): boolean;

Description

Connects the Boolean type variable of your program (Variable) to run-time variable of AdCalc (VName) so, that assigning value to one from them, will be reflected on other. In case of successful completion of connection the function will return True.

If the variable of your program is local, before exit from procedure, is necessary to call the method DisconnectVar.

The PriorityVar defines whose value will remain to variable after calling of this method - variable of your program or run-time variable of AdCalc.


ConnectBooleanVar method - See also
See also

ConnectDateTimeVar method

ConnectExtendedVar method

ConnectIntegerVar method

ConnectStringVar method

DisconnectVar method


ConnectDateTimeVar method

See also

Applies to

TAdCalc component

Declaration

function ConnectDateTimeVar(VName: string; var Variable: TDateTime; PriorityVar: TPriorityVar): boolean;

Description

Connects the TDateTime type variable of your program (Variable) to same type run-time variable of AdCalc (VName) so, that assigning value to one from them, will be reflected on other. In case of successful completion of connection the function will return True.

If the variable of your program is local, before exit from procedure, is necessary to call the method DisconnectVar.

The PriorityVar defines whose value will remain to variable after calling of this method - variable of your program or run-time variable of AdCalc.


ConnectDateTimeVar method - See also
See also

ConnectBooleanVar method

ConnectExtendedVar method

ConnectIntegerVar method

ConnectStringVar method

DisconnectVar method


ConnectExtendedVar method

See also	Example

Applies to

TAdCalc component

Declaration

function ConnectExtendedVar(VName: string; var Variable: extended; PriorityVar: TPriorityVar): boolean;

Description

Connects the Extended type variable of your program (Variable) to same type run-time variable of AdCalc (VName) so, that assigning value to one from them, will be reflected on other. In case of successful completion of connection the function will return True.

If the variable of your program is local, before exit from procedure, is necessary to call the method DisconnectVar.

The PriorityVar defines whose value will remain to variable after calling of this method - variable of your program or run-time variable of AdCalc.


ConnectExtendedVar method - See also
See also

ConnectBooleanVar method

ConnectDateTimeVar method

ConnectIntegerVar method

ConnectStringVar method

DisconnectVar method


ConnectExtendedVar method - Example
ConnectExtendedVar method example

var

  X, FX, MaxX, DeltaX: extended;

begin

  AdCalc1.RegVariable('X',etExtended);

  AdCalc1.SetExtendedVarValue('X',-100)

  if AdCalc1.ConnectExtendedVar('X',X,pvAdCalc) then begin

    try

      MaxX:=X+200;

      DeltaX:=1;

      Memo1.Clear;

      Memo1.Lines.Add('X^2');

      ListBox1.Items.Clear;

      while X<=MaxX do begin

        if AdCalc1.GetExtendedResult(Memo1.Text,FX,Memo1Handle) then

          ListBox1.Items.Add('X='+FloatToStr(X)+'; FX='+FloatToStr(FX));

        X:=X+DeltaX;

      end;

    finally

      if CheckBox1.Checked then

        AdCalc1.DisconnectVar('X',pvAdCalc) {Reset Argument}

      else AdCalc1.DisconnectVar('X',pvCode);

    end;

  end;

end;


ConnectIntegerVar method

See also

Applies to

TAdCalc component

Declaration

function ConnectIntegerVar(VName: string; var Variable: integer; PriorityVar: TPriorityVar): boolean;

Description

Connects the Integer type variable of your program (Variable) to same type run-time variable of AdCalc (VName) so, that assigning value to one from them, will be reflected on other. In case of successful completion of connection the function will return True.

If the variable of your program is local, before exit from procedure, is necessary to call the method DisconnectVar.

The PriorityVar defines whose value will remain to variable after calling of this method - variable of your program or run-time variable of AdCalc.


ConnectIntegerVar method - See also
See also

ConnectBooleanVar method

ConnectDateTimeVar method

ConnectExtendedVar method

ConnectStringVar method

DisconnectVar method


ConnectStringVar method

See also

Applies to

TAdCalc component

Declaration

function ConnectStringVar(VName: string; var Variable: string; PriorityVar: TPriorityVar): boolean;

Description

Connects the String type variable of your program (Variable) to same type run-time variable of AdCalc (VName) so, that assigning value to one from them, will be reflected on other. In case of successful completion of connection the function will return True.

If the variable of your program is local, before exit from procedure, is necessary to call the method DisconnectVar.

The PriorityVar defines whose value will remain to variable after calling of this method - variable of your program or run-time variable of AdCalc.


ConnectStringVar method - See also
See also

ConnectBooleanVar method

ConnectDateTimeVar method

ConnectExtendedVar method

ConnectIntegerVar method

DisconnectVar method


ExecuteBlock method

See also

Applies to

TAdCalc component

Declaration

function ExecuteBlock(Handle: integer): boolean;

Description

Evaluates the compiled text of expressions under number Handle, assigning values to variables. If error will occured, the function will return False. The handle also is intended for identification of expression in the events of error handling.


ExecuteBlock method - See also
See also

ExecuteBoolean method

ExecuteDateTime method

ExecuteExtended method

ExecuteInteger method

ExecuteString method

GetBlockResult method

AddText method

ClearExpressions method

RemoveText method


ExecuteBoolean method

See also

Applies to

TAdCalc component

Declaration

function ExecuteBoolean(var Value: boolean; Handle: integer): boolean;

Description

Evaluates the compiled expression of Boolean type under number Handle. If error will occured, the function will return False. Handle also is intended for identification of expression in the events of error handling.


ExecuteBoolean method - See also
See also

ExecuteBlock method

ExecuteDateTime method

ExecuteExtended method

ExecuteInteger method

ExecuteString method

GetBooleanResult method

AddText method

ClearExpressions method

RemoveText method


ExecuteDateTime method

See also

Applies to

TAdCalc component

Declaration

function ExecuteDateTime(var Value: TDateTime; Handle: integer): boolean;

Description

Evaluates the compiled expression of DateTime type under number Handle. If error will occured, the function will return False. Handle also is intended for identification of expression in the events of error handling.


ExecuteDateTime method - See also
See also

ExecuteBlock method

ExecuteBoolean method

ExecuteExtended method

ExecuteInteger method

ExecuteString method

GetDateTimeResult method

AddText method

ClearExpressions method

RemoveText method


ExecuteExtended method

See also

Applies to

TAdCalc component

Declaration

function ExecuteExtended(var Value: extended; Handle: integer): boolean;

Description

Evaluates the compiled expression of Extended type under number Handle. If error will occured, the function will return False. Handle also is intended for identification of expression in the events of error handling.


ExecuteExtended method - See also
See also

ExecuteBlock method

ExecuteBoolean method

ExecuteDateTime method

ExecuteInteger method

ExecuteString method

GetExtendedResult method

AddText method

ClearExpressions method

RemoveText method


ExecuteInteger method

See also

Applies to

TAdCalc component

Declaration

function ExecuteInteger(var Value: integer; Handle: integer): boolean;

Description

Evaluates the compiled expression of Integer type under number Handle. If error will occured, the function will return False. Handle also is intended for identification of expression in the events of error handling.


ExecuteInteger method - See also
See also

ExecuteBlock method

ExecuteBoolean method

ExecuteDateTime method

ExecuteExtended method

ExecuteString method

GetIntegerResult method

AddText method

ClearExpressions method

RemoveText method


ExecuteString method

See also

Applies to

TAdCalc component

Declaration

function ExecuteString(var Value: string; Handle: integer): boolean;

Description

Evaluates the compiled expression of String type under number Handle. If error will arise, the function will return False. Handle also is intended for identification of expression in the events of error handling.


ExecuteString method - See also
See also

ExecuteBlock method

ExecuteBoolean method

ExecuteDateTime method

ExecuteExtended method

ExecuteInteger method

GetStringResult method

AddText method

ClearExpressions method

RemoveText method


GetBlockResult method

See also

Applies to

TAdCalc component

Declaration

function GetBlockResult(Formula: string; Handle: integer): boolean;

Description

Evaluates the text of expressions without preliminary compilation, assigning values to variables. If error will occured, the function will return False. Handle is intended for identification of text in the events of error handling.


GetBlockResult method - See also
See also

ExecuteBlock method

GetBooleanResult method

GetDateTimeResult method

GetExtendedResult method

GetIntegerResult method

GetStringResult method


GetBooleanResult method

See also	Example

Applies to

TAdCalc component

Declaration

function GetBooleanResult(Formula: string; var Value: boolean; Handle: integer): boolean;

Description

Evaluates expression (Formula) of Boolean type without preliminary compilation. If error will occured, the function will return False. Handle is intended for identification of expression in the events of error handling.


GetBooleanResult method - See also
See also

ExecuteBoolean method

GetBlockResult method

GetDateTimeResult method

GetExtendedResult method

GetIntegerResult method

GetStringResult method


GetBooleanResult method - Example
GetBooleanResult method example

if AdCalc1.GetBooleanResult(Memo1.Text,Value,Memo1Handle) then

  if Value then Label1.Caption:='Result = True'

  else Label1.Caption:='Result = False';


GetBooleanVarValue method

See also

Applies to

TAdCalc component

Declaration

function GetBooleanVarValue(VName: string; var Value: boolean): boolean;

Description

If the variable of Boolean type VName will be found, the function will return True with the Value of this variable.


GetBooleanVarValue method - See also
See also

GetDateTimeVarValue method

GetExtendedVarValue method

GetIntegerVarValue method

GetStringVarValue method

SetBooleanVarValue method


GetDateTimeResult method

See also

Applies to

TAdCalc component

Declaration

function GetDateTimeResult(Formula: string; var Value: TDateTime; Handle: integer): boolean;

Description

Evaluates expression (Formula) of DateTime type without preliminary compilation. If error will occured, the function will return False. Handle is intended for identification of expression in the events of error handling.


GetDateTimeResult method - See also
See also

ExecuteDateTime method

GetBlockResult method

GetBooleanResult method

GetExtendedResult method

GetIntegerResult method

GetStringResult method


GetDateTimeVarValue method

See also

Applies to

TAdCalc component

Declaration

function GetDateTimeVarValue(VName: string; var Value: TDateTime): boolean;

Description

If the variable of DateTime type VName will be found, the function will return True with the Value of this variable.


GetDateTimeVarValue method - See also
See also

GetBooleanVarValue method

GetExtendedVarValue method

GetIntegerVarValue method

GetStringVarValue method

SetDateTimeVarValue method


GetExtendedResult method

See also	Example

Applies to

TAdCalc component

Declaration

function GetExtendedResult(Formula: string; var Value: extended; Handle: integer): boolean;

Description

Evaluates expression (Formula) of Extended type without preliminary compilation. If error will occured, the function will return False. Handle is intended for identification of expression in the events of error handling.


GetExtendedResult method - See also
See also

ExecuteExtended method

GetBlockResult method

GetBooleanResult method

GetDateTimeResult method

GetIntegerResult method

GetStringResult method


GetExtendedResult method - Example
GetExtendedResult method example

if AdCalc1.GetExtendedResult(Memo1.Text, Value, Memo1Handle) then

  Label1.Caption:='Result = '+FloatToStr(Value);


GetExtendedVarValue method

See also

Applies to

TAdCalc component

Declaration

function GetExtendedVarValue(VName: string; var Value: Extended): boolean;

Description

If the variable of Extended type VName will be found, the function will return True with the Value of this variable.


GetExtendedVarValue method - See also
See also

GetBooleanVarValue method

GetDateTimeVarValue method

GetIntegerVarValue method

GetStringVarValue method

SetExtendedVarValue method


GetFunctDescription method

See also

Applies to

TAdCalc component

Declaration

function GetFunctDescription(FName: string; var Description: string): boolean;

Description

If the function FName will be found, the function will return True with the Description of this function.


GetFunctDescription method - See also
See also

GetFunctProperties method

SetFunctDescription method

DefineFunction method

GetFunctList method

RegFunction method


GetFunctProperties method

See also	Example

Applies to

TAdCalc component

Declaration

function GetFunctProperties(FName: string; var FType: TExprType; var Formula: string; var Description: string): boolean;

Description

If the function FName will be found, the function will return True with the type (FType), expression (Formula) and Description of this function.

You should use the dinamic array field FParams for getting information about types of parameters of this function.

TAdCalc.FParams: array of TExprType.

This field should use only after calling of the function GetFunctProperties.


GetFunctProperties method - See also
See also

GetVarProperties method

GetFunctDescription method

SetFunctDescription method

DefineFunction method

GetFunctList method

RegFunction method


GetFunctProperties method - Example
GetFunctProperties method example

var

  Formula, Descr: string;

  FType: TExprType;

  i: integer;

begin

 if AdCalc1.GetFunctProperties('MyFunction', FType, Formula, Descr) then begin

   Label1.Caption:='Function name - ' + FName;

   case FType of

     etInteger: Label2.Caption:='Type of function - Integer');

     etExtended: Label2.Caption:='Type of function - xtended';

     etBoolean: Label2.Caption:='Type of function - Boolean');

     etString: Label2.Caption:='Type of function - String');

     etDateTime: Label2.Caption:='Type of function - DateTime');

   end;

   Label3.Caption:='Description - ' + Descr;

   Memo1.Text:=Formula;

   ListBox1.Clear;

   for i:=0 to High(AdCalc1.FParams) do

     case AdCalc1.FParams[i] of

       etInteger: ListBox1.Items.Add('Integer');

       etExtended: ListBox1.Items.Add('Extended');

       etBoolean: ListBox1.Items.Add('Boolean');

       etString: ListBox1.Items.Add('String');

       etDateTime: ListBox1.Items.Add('DateTime');

     end;

 end;

end;


GetIntegerResult method

See also

Applies to

TAdCalc component

Declaration

function GetIntegerResult(Formula: string; var Value: integer; Handle: integer): boolean;

Description

Evaluates expression (Formula) of Integer type without preliminary compilation. If error will occured, the function will return False. Handle is intended for identification of expression in the events of error handling.


GetIntegerResult method - See also
See also

ExecuteInteger method

GetBlockResult method

GetBooleanResult method

GetDateTimeResult method

GetExtendedResult method

GetStringResult method


GetIntegerVarValue method

See also

Applies to

TAdCalc component

Declaration

function GetIntegerVarValue(VName: string; var Value: integer): boolean;

Description

If the variable of Integer type VName will be found, the function will return True with the Value of this variable.


GetIntegerVarValue method - See also
See also

GetBooleanVarValue method

GetDateTimeVarValue method

GetExtendedVarValue method

GetStringVarValue method

SetIntegerVarValue method


GetStringResult method

See also

Applies to

TAdCalc component

Declaration

function GetStringResult(Formula: string; var Value: string; Handle: integer): boolean;

Description

Evaluates expression (Formula) of String type without preliminary compilation. If error will occured, the function will return False. Handle is intended for identification of expression in the events of error handling.


GetStringResult method - See also
See also

ExecuteString method

GetBlockResult method

GetBooleanResult method

GetDateTimeResult method

GetExtendedResult method

GetIntegerResult method


GetStringVarValue method

See also

Applies to

TAdCalc component

Declaration

function GetStringVarValue(VName: string; var Value: string): boolean;

Description

If the variable of String type VName will be found, the function will return True with the Value of this variable.


GetStringVarValue method - See also
See also

GetBooleanVarValue method

GetDateTimeVarValue method

GetExtendedVarValue method

GetIntegerVarValue method

SetStringVarValue method


GetVarDescription method

See also

Applies to

TAdCalc component

Declaration

function GetVarDescription(VName: string; var Description: string): boolean;

Description

If the variable VName will be found, the function will return True with the Description of this variable.


GetVarDescription method - See also
See also

GetFunctDescription method

GetVarProperties method

SetVarDescription method

GetVarList method

RegVariable method


GetVarProperties method

See also

Applies to

TAdCalc component

Declaration

function GetVarProperties(VName: string; var VType: TExprType; var Value: pointer; var Description: string): boolean;

Description

If the variable VName will be found, the function will return True with the type (VType), pointer to Value and Description of this variable.


GetVarProperties method - See also
See also

GetFunctProperties method

GetVarDescription method

SetVarDescription method

GetVarList method

RegVariable method


RemoveVar method

See also	Example

Applies to

TAdCalc component

Declaration

function RemoveVar(VName: string): Boolean;

Description

If the variable VName will be found, the function will return True and will delete the variable VName.


RemoveVar method - See also
See also

RegVariable

RemoveFunct


RemoveVar method - Example
RemoveVar method example

var

  VName: string;

begin

  VName:=ListBox1.Items[ListBox1.ItemIndex];

  if MessageDlg('Are you sure to delete variable "' + VName + '"',

    mtConfirmation, [mbYes, mbNo], 0) = mrYes then

    AdCalc1.RemoveVar(VName);

end;


SetBooleanVarValue method

See also	Example

Applies to

TAdCalc component

Declaration

function SetBooleanVarValue(VName: string; Value: boolean): boolean;

Description

If the variable of Boolean type VName will be found, the function will return True and will set the Value to this variable.


SetBooleanVarValue method - See also
See also

GetBooleanVarValue method

SetDateTimeVarValue method

SetExtendedVarValue method

SetIntegerVarValue method

SetStringVarValue method


SetBooleanVarValue method - Example
SetBooleanVarValue method example

AdCalc1.SetBooleanVarValue(MyVarName, true);


SetDateTimeVarValue method

See also

Applies to

TAdCalc component

Declaration

function SetDateTimeVarValue(VName: string; Value: TDateTime): boolean;

Description

If the variable of DateTime type VName will be found, the function will return True and will set the Value to this variable.


SetDateTimeVarValue method - See also
See also

GetDateTimeVarValue method

SetBooleanVarValue method

SetExtendedVarValue method

SetIntegerVarValue method

SetStringVarValue method


SetExtendedVarValue method

See also	Example

Applies to

TAdCalc component

Declaration

function SetExtendedVarValue(VName: string; Value: Extended): boolean;

Description

If the variable of Extended type VName will be found, the function will return True and will set the Value to this variable.


SetExtendedVarValue method - See also
See also

GetExtendedVarValue method

SetBooleanVarValue method

SetDateTimeVarValue method

SetIntegerVarValue method

SetStringVarValue method


SetExtendedVarValue method - Example
SetExtendedVarValue method example

AdCalc1.SetExtendedVarValue(MyVarName,100);


SetFunctDescription method

See also

Applies to

TAdCalc component

Declaration

function SetFunctDescription(FName: string; Description: string): boolean;

Description

If the function FName will be found, the function will return True and will set its Description.


SetFunctDescription method - See also
See also

GetFunctDescription method

GetFunctProperties method

DefineFunction method

GetFunctList method

RegFunction method


SetIntegerVarValue method

See also

Applies to

TAdCalc component

Declaration

function SetIntegerVarValue(VName: string; Value: integer): boolean;

Description

If the variable of Integer type VName will be found, the function will return True and will set the Value to this variable.


SetIntegerVarValue method - See also
See also

GetIntegerVarValue method

SetBooleanVarValue method

SetDateTimeVarValue method

SetExtendedVarValue method

SetStringVarValue method


SetStringVarValue method

See also

Applies to

TAdCalc component

Declaration

function SetStringVarValue(VName, Value: string): boolean;

Description

If the variable of String type VName will be found, the function will return True and will set the Value to this variable.


SetStringVarValue method - See also
See also

GetStringVarValue method

SetBooleanVarValue method

SetDateTimeVarValue method

SetExtendedVarValue method

SetIntegerVarValue method


SetVarDescription method

See also

Applies to

TAdCalc component

Declaration

function SetVarDescription(VName: string; Description: string): boolean;

Description

If the variable VName will be found, the function will return True and will set Description for this variable.


SetVarDescription method - See also
See also

SetFunctDescription method

GetVarDescription method

GetVarProperties method

GetVarList method

RegVariable method


AddText method

See also	Example

Applies to

TAdCalc component

Declaration

procedure AddText(Formula: string; Handle: integer);

Description

Makes intermediate compilation of Text (Formula) for fast repeated evaluation. It does not inform about errors at compilation time. After compilation of text, it can be evaluated by the methods ExecuteBlock, ExecuteInteger, ExecuteExtended, ExecuteBoolean, ExecuteString or ExecuteDateTime. Handle is intended for identification of text in the events of error handling.


AddText method - See also
See also

ClearExpressions method

RemoveText method


AddText method - Example
AddText method example

var

  X, FX: extended;

begin

  X:=MinX;

  Series1.Clear;

  AdCalc1.AddText(Memo1.Text, Memo1Handle);

  try

  while X <= MaxX do begin

    if AdCalc1.ExecuteExtended(FX, Memo1Handle) then begin

      Series1.Add(FX, FloatToStr(X), clRed);

      X:=X + DeltaX;

    end

    else Exit;

  end;

  finally

    AdCalc1.RemoveText(Memo1Handle);

  end;

end;


ClearExpressions method

See also

Applies to

TAdCalc component

Declaration

procedure ClearExpressions;

Description

Deletes all compiled texts from memory.


ClearExpressions method - See also
See also

AddText method

RemoveText method


ClearFunctions method

See also

Applies to

TAdCalc component

Declaration

procedure ClearFunctions;

Description

Deletes all functions, that are declared at run-time by the methods RegFunction.


ClearFunctions method - See also
See also

ClearVariables

RemoveFunct


ClearVariables method

See also

Applies to

TAdCalc component

Declaration

procedure ClearVariables;

Description

Deletes all variables, that are declared at run-time by the method RegVariable.


ClearVariables method - See also
See also

ClearFunctions method


DefineFunction method

See also

Applies to

TAdCalc component

Declaration

procedure DefineFunction(FName: string; FType: TExprType; Params: array of TExprType);

Description

Declares function under the name - FName, type - FType and parameters - Params, which is realized in the events OnGetIntegerFunct, OnGetExtendedFunct, OnGetBooleanFunct, OnGetStringFunct or OnGetDateTimeFunct.


DefineFunction method - See also
See also

ClearFunctions method

RegFunction method

RemoveFunct method


DisconnectVar method

See also

Applies to

TAdCalc component

Declaration

procedure DisconnectVar(VName: string; PriorityVar: TPriorityVar);

Description

Disconnects the run-time variable of AdCalc VName from variable of your program. If PriorityVar will "pvAdCalc", at variable will remain value, which was before connection.


DisconnectVar method - See also
See also

ConnectBooleanVar method

ConnectDateTimeVar method

ConnectExtendedVar method

ConnectIntegerVar method

ConnectStringVar method


GetFunctList method

See also

Applies to

TAdCalc component

Declaration

procedure GetFunctList;

Description

This method will actuate the event OnFunctList for construction of list of functions with the properties declared at run-time by the method RegFunction.


GetFunctList method - See also
See also

GetFunctDescription method

GetFunctProperties method

GetVarList method

SetFunctDescription method


GetVarList method

See also

Applies to

TAdCalc component

Declaration

procedure GetVarList(UseConnectedVarValue: boolean);

Description

This method will actuate the event OnVarList for construction of list of variables with the Properties declared at run-time by the method RegVariable. UseConnectedVarValue determines - whether to produce values of a connected variables in case of connection or to produce own values.


GetVarList method - See also
See also

GetFunctList

GetVarDescription method

GetVarProperties method

SetVarDescription method


LoadLibrary method

See also

Applies to

TAdCalc component

Declaration

procedure LoadLibrary(FileName: string);

Description

Loades library of run-time variables and functions from file under the name FileName.


LoadLibrary method - See also
See also

SaveLibrary


RegFunction method

See also

Applies to

TAdCalc component

Declaration

procedure RegFunction(FName: string; FType: TExprType; Params: array of TExprType; Formula: string; Description: string);

Description

This method declares function at run-time under the name - FName, type - FType, parameters - Params, expression - Formula and description - Description. In the expression you can call transmitted parameters by the identifier "Param". For example: the first parameter will be noted so - Param(1).


RegFunction method - See also
See also

GetFunctDescription method

GetFunctProperties method

SetFunctDescription method

DefineFunction method

GetFunctList method


RegVariable method

See also

Applies to

TAdCalc component

Declaration

procedure RegVariable(VName: string; VType: TExprType; Description: string);

Description

Registers variable under the name - VName, type - VType and description - Description at run-time.


RegVariable method - See also
See also

RegFunction method

GetVarDescription method

GetVarProperties method

SetVarDescription method

GetVarList method


RemoveFunct method

See also

Applies to

TAdCalc component

Declaration

procedure RemoveFunct(FName: string);

Description

Deletes the function under the name FName declared by the methods DefineFunction or RegFunction.


RemoveFunct method - See also
See also

RemoveVar method

ClearFunctions method


RemoveText method

See also	Example

Applies to

TAdCalc component

Declaration

procedure RemoveText(Handle: integer);

Description

Deletes the compiled text under the number Handle from memory.


RemoveText method - See also
See also

AddText method

ClearExpressions method


RemoveText method - Example
RemoveText method example

var

  X, FX: extended;

begin

  X:= MinX;

  Series1.Clear;

  AdCalc1.AddText(Memo1.Text, Memo1Handle);

  try

  while X <= MaxX do begin

    if AdCalc1.ExecuteExtended(FX, Memo1Handle) then begin

      Series1.Add(FX, FloatToStr(X), clRed);

      X:=X + DeltaX;

    end

    else Exit;

  end;

  finally

    AdCalc1.RemoveText(Memo1Handle);

  end;

end;


SaveLibrary method

See also

Applies to

TAdCalc component

Declaration

procedure SaveLibrary(FileName: string);

Description

Saves library of run-time variables and functions in file under the name FileName.


SaveLibrary method - See also
See also

LoadLibrary


OnError event

See also	Example

Applies to

TAdCalc component

Declaration

property OnError: TErrorEvent;

Description

This event will be actuated in case the error will occured in expression during evaluation.


OnError event - See also
See also

OnFunctError event


OnError event - Example
OnError event example

procedure TMainForm.AdCalc1Error(Sender: TObject;

          ErrorLine, ErrorPosition, ErrorPlace,

          ErrorCode: Integer; ErrorStr: String;

          Handle: Integer);

begin

  case Handle of

    Memo1Handle: begin

      ShowMessage('Error '+IntToStr(ErrorCode)+

                ', Line '+IntToStr(ErrorLine)+

                ', Col '+IntToStr(ErrorPosition)+

                ', '+ErrorStr);

      ActiveControl:=Memo1;

      Memo1.SelStart:=ErrorPlace;

    end;

    Edit1Handle: begin

      ShowMessage('Error '+IntToStr(ErrorCode)+

                ', Position '+IntToStr(ErrorPosition)+

                ', '+ErrorStr);

      ActiveControl:=Edit1;

      Edit1.SelStart:=ErrorPlace;

    end;

  end;

end;


OnFunctError event

See also	Example

Applies to

TAdCalc component

Declaration

property OnFunctError: TFunctErrorEvent;

Description

This event will be actuated during evaluation in case the error will occured in expression of run-time defined function.


OnFunctError event - See also
See also

OnError event


OnFunctError event - Example
OnFunctError event example

procedure TMainForm.AdCalc1FunctError(Sender: TObject; FunctName: String;

  ErrorLine, ErrorPosition, ErrorPlace, ErrorCode: Integer;

  ErrorStr: String);

begin

  ShowMessage('Function - "'+AnsiUpperCase(FunctName)+

    '"; Line - '+IntToStr(ErrorLine)+

    '; Col - '+IntToStr(ErrorPosition)+'; '+ErrorStr);

end;


OnFunctList event

See also

Applies to

TAdCalc component

Declaration

property OnFunctList: TFunctListEvent;

Description

This event is actuated after calling of method GetFunctList and builds list of functions defined at run-time with properties.


OnFunctList event - See also
See also

OnVarList event


OnGetBooleanFunct event

See also	Example

Applies to

TAdCalc component

Declaration

property OnGetBooleanFunct: TGetBooleanFunctEvent;

Description

In this event is realized a function of Boolean type, that is declared by the method DefineFunction.


OnGetBooleanFunct event - See also
See also

OnGetBooleanVar event

OnGetDateTimeFunct event

OnGetExtendedFunct event

OnGetIntegerFunct event

OnGetStringFunct event


OnGetBooleanFunct event - Example
OnGetBooleanFunct event example

procedure TMainForm.FormCreate(Sender: TObject);

begin

  AdCalc1.DefineFunction('IsEqual', etBoolean,

  [etExtended, etExtended]);

end;

procedure TMainForm.AdCalc1GetBooleanFunct(Sender: TObject;

  FunctName: String; ParamValues: TFunctParamValues;

  var Found, Value: Boolean);

begin

  if FunctName = LowerCase('IsEqual') then

  with AdCalc1 do begin

    Found:=true;

    Value:=extended(ParamValues[0].Value^)=extended(ParamValues[1].Value^);

  end;

end;


OnGetBooleanVar event

See also	Example

Applies to

TAdCalc component

Declaration

property OnGetBooleanVar: TGetBooleanVarEvent;

Description

In this event is determined an unknow identifier as variable of Boolean type with its value.


OnGetBooleanVar event - See also
See also

OnGetBooleanFunct event

OnGetDateTimeVar event

OnGetExtendedVar event

OnGetIntegerVar event

OnGetStringVar event


OnGetBooleanVar event - Example
OnGetBooleanVar event example

procedure TMainForm.AdCalc1GetBooleanVar(Sender: TObject;

  VarName: String; var Found, Value: Boolean);

begin

  if VarName = LowerCase('MyBooleanVar') then

    Found:=AdCalc1.GetBooleanResult(Edit1.Text, Value, Edit1Handle);

end;


OnGetDateTimeFunct event

See also

Applies to

TAdCalc component

Declaration

property OnGetDateTimeFunct: TGetDateTimeFunctEvent;

Description

In this event is realized a function of DateTime type, that is declared by the method DefineFunction.


OnGetDateTimeFunct event - See also
See also

OnGetBooleanFunct event

OnGetDateTimeVar event

OnGetExtendedFunct event

OnGetIntegerFunct event

OnGetStringFunct event


OnGetDateTimeVar event

See also	Example

Applies to

TAdCalc component

Declaration

property OnGetDateTimeVar: TGetDateTimeVarEvent;

Description

In this event is determined an unknow identifier as variable of DateTime type with its value.


OnGetDateTimeVar event - See also
See also

OnGetBooleanVar event

OnGetDateTimeFunct event

OnGetExtendedVar event

OnGetIntegerVar event

OnGetStringVar event


OnGetDateTimeVar event - Example
OnGetDateTimeVar event example

procedure TMainForm.AdCalc1GetDateTimeVar(Sender: TObject;

  VarName: String; var Found: Boolean; var Value: TDateTime);

begin

  if VarName = AnsiLowerCase('Now') then begin

    Found:=true;

    Value:=Now;

  end;

end;


OnGetExtendedFunct event

See also	Example

Applies to

TAdCalc component

Declaration

property OnGetExtendedFunct: TGetExtendedFunctEvent;

Description

In this event is realized a function of Extended type, that is declared by the method DefineFunction.


OnGetExtendedFunct event - See also
See also

OnGetBooleanFunct event

OnGetExtendedVar event

OnGetDateTimeFunct event

OnGetIntegerFunct event

OnGetStringFunct event


OnGetExtendedFunct event - Example
OnGetExtendedFunct event example

procedure TMainForm.FormCreate(Sender: TObject);

begin

  AdCalc1.DefineFunction('Max', etExtended,

  [etExtended, etExtended]);

end;

procedure TMainForm.AdCalc1GetExtendedFunct(Sender: TObject;

  FunctName: String; ParamValues: TFunctParamValues;

  var Found: Boolean; var Value: Extended);

begin

  if FunctName=LowerCase('Max') then with AdCalc1 do begin

    Found:=true;

    if extended(ParamValues[0].Value^)>extended(ParamValues[1].Value^) then

      Value:=extended(ParamValues[0].Value^)

    else Value:=extended(ParamValues[1].Value^);

  end;

end;


OnGetExtendedVar event

See also	Example

Applies to

TAdCalc component

Declaration

property OnGetExtendedVar: TGetExtendedVarEvent;

Description

In this event is determined an unknow identifier as variable of Extended type with its value.


OnGetExtendedVar event - See also
See also

OnGetBooleanVar event

OnGetDateTimeVar event

OnGetExtendedFunct event

OnGetIntegerVar event

OnGetStringVar event


OnGetExtendedVar event - Example
OnGetExtendedVar event example

procedure TMainForm.AdCalc1GetExtendedVar(Sender: TObject;

  VarName: String; var Found: boolean; Value: extended);

begin

  if VarName = LowerCase('MyExtendedVar') then begin

    Found:=AdCalc1.GetExtendedResult(Edit1.Text, Value, Edit1Handle);

  end;

end;


OnGetIntegerFunct event

See also

Applies to

TAdCalc component

Declaration

property OnGetIntegerFunct: TGetIntegerFunctEvent;

Description

In this event is realized a function of Integer type, that is declared by the method DefineFunction.


OnGetIntegerFunct event - See also
See also

OnGetBooleanFunct event

OnGetDateTimeFunct event

OnGetExtendedFunct event

OnGetIntegerVar event

OnGetStringFunct event


OnGetIntegerVar event

See also

Applies to

TAdCalc component

Declaration

property OnGetIntegerVar: TGetIntegerVarEvent;

Description

In this event is determined an unknow identifier as variable of Integer type with its value.


OnGetIntegerVar event - See also
See also

OnGetBooleanVar event

OnGetDateTimeVar event

OnGetExtendedVar event

OnGetIntegerFunct event

OnGetStringVar event


OnGetStringFunct event

See also	Example

Applies to

TAdCalc component

Declaration

property OnGetStringFunct: TGetStringFunctEvent;

Description

In this event is realized a function of String type, that is declared by the method DefineFunction.


OnGetStringFunct event - See also
See also

OnGetBooleanFunct event

OnGetDateTimeFunct event

OnGetExtendedFunct event

OnGetIntegerFunct event

OnGetStringVar event


OnGetStringFunct event - Example
OnGetStringFunct event example

procedure TMainForm.FormCreate(Sender: TObject);

begin

  AdCalc1.DefineFunction('IfStr', etString,

  [etBoolean, etString, etString]);

end;

procedure TMainForm.AdCalc1GetStringFunct(Sender: TObject;

  FunctName: String; var Found: Boolean; var Value: String);

begin

  if FunctName=LowerCase('IfStr') then with AdCalc1 do begin

    Found:=true;

    if boolean(ParamValues[0].Value^) then

      Value:=string(ParamValues[1].Value^)

    else Value:=string(ParamValues[2].Value^);

  end;

end;


OnGetStringVar event

See also

Applies to

TAdCalc component

Declaration

property OnGetStringVar: TGetStringVarEvent;

Description

In this event is determined an unknow identifier as variable of String type with its value.


OnGetStringVar event - See also
See also

OnGetBooleanVar event

OnGetDateTimeVar event

OnGetExtendedVar event

OnGetIntegerVar event

OnGetStringFunct event


OnVarList event

See also

Applies to

TAdCalc component

Declaration

property OnVarList: TVarListEvent;

Description

This event is actuated after calling of method GetVarList and builds list of variables defined at run-time.


OnVarList event - See also
See also

OnFunctList event


PStrValue type

Unit

AdCalc

Declaration

type PStrValue = ^string;


TCommentSign type

See also

Unit

AdCalc

Declaration

type TCommentSign = (csApostrophe, csQMark, csDublDiv);

Description

Sign for comments ( '  " // ).


TCommentSign type - See also
See also

CommentSign property


TErrorEvent type

See also

Unit

AdCalc

Declaration

type TErrorEvent = procedure(Sender: TObject; ErrorLine, ErrorPosition, ErrorPlace, ErrorCode: integer; ErrorStr: string; Handle: integer) of Object;

Description

ErrorLine - number of line where error was occured;

ErrorPosition - number of position in the line, where error was occured;

ErrorPlace - number of position in the whole text, where error was occured;

ErrorCode - code of error;

ErrorStr - description of error;

Handle - Number of expression where error was occured.


TErrorEvent type - See also
See also

OnError event


TExprType type

Unit

AdCalc

Declaration

type TExprType = (etInteger, etExtended, etBoolean, etString, etDateTime);

Description

5 base types of expression.


TFunctErrorEvent type

See also

Unit

AdCalc

Declaration

type TFunctErrorEvent = procedure(Sender: TObject; FunctName: string; ErrorLine, ErrorPosition, ErrorPlace, ErrorCode: integer; ErrorStr: string) of Object;

Description

FunctName - name of function where an error was occured;

ErrorLine - number of line where error was occured;

ErrorPosition - number of position in the line, where error was occured;

ErrorPlace - number of position in the whole text, where error was occured;

ErrorCode - code of error;

ErrorStr - description of error.


TFunctErrorEvent type - See also
See also

OnFunctError event


TFunctListEvent type

See also

Unit

AdCalc

Declaration

type TFunctListEvent = procedure(Sender: TObject; FunctName: string; FunctType: TExprType; Formula: string; Params: array of TExprType; Description: string) of Object;

Description

FunctName - name of function;

FunctType - type of function;

Formula - expression of function;

Params - parameters of function;   ( first parameter - Params[0] )

Description - description of function.


TFunctListEvent type - See also
See also

OnFunctList event

GetFunctList method


TFunctParamValues type

Unit

AdCalc

Declaration

type TFunctParamValues = array of record

  ParamType: TExprType;

  Value: pointer;

end;


TGetBooleanFunctEvent type

See also

Unit

AdCalc

Declaration

type TGetBooleanFunctEvent = procedure(Sender: TObject; FunctName: string; ParamValues: TFunctParamValues; var Found: boolean; var Value: boolean) of Object;

Description

FunctName - name of function;

ParamValues - types and values of parameters; ( first parameter - ParamValues[0] )

Found - should be assigned True if the function is determined;

Value - should be assigned the Boolean type result value of function.


TGetBooleanFunctEvent type - See also
See also

OnGetBooleanFunct event


TGetBooleanVarEvent type

See also

Unit

AdCalc

Declaration

type TGetBooleanVarEvent = procedure(Sender: TObject; VarName: string; var Found: boolean; var Value: boolean) of Object;

Description

VarName - name of variable;

Found - should be assigned True if the variable is determined;

Value - should be assigned a value of Boolean type.


TGetBooleanVarEvent type - See also
See also

OnGetBooleanVar event


TGetDateTimeFunctEvent type

See also

Unit

AdCalc

Declaration

type TGetDateTimeFunctEvent = procedure(Sender: TObject; FunctName: string; ParamValues: TFunctParamValues; var Found: boolean; var Value: TDateTime) of Object;

Description

FunctName - name of function;

ParamValues - types and values of parameters; ( first parameter - ParamValues[0] )

Found - should be assigned True if the function is determined;

Value - should be assigned the DateTime type result value of function.


TGetDateTimeFunctEvent type - See also
See also

OnGetDateTimeFunct event


TGetDateTimeVarEvent type

See also

Unit

AdCalc

Declaration

type TGetDateTimeVarEvent = procedure(Sender: TObject; VarName: string; var Found: boolean; var Value: TDateTime) of Object;

Description

VarName - name of variable;

Found - should be assigned True if the variable is determined;

Value - should be assigned a value of DateTime type.


TGetDateTimeVarEvent type - See also
See also

OnGetDateTimeVar event


TGetExtendedFunctEvent type

See also

Unit

AdCalc

Declaration

type TGetExtendedFunctEvent = procedure(Sender: TObject; FunctName: string; ParamValues: TFunctParamValues; var Found: boolean; var Value: extended) of Object;

Description

FunctName - name of function;

ParamValues - types and values of parameters; ( first parameter - ParamValues[0] )

Found - should be assigned True if the function is determined;

Value - should be assigned the Extended type result value of function.


TGetExtendedFunctEvent type - See also
See also

OnGetExtendedFunct event


TGetExtendedVarEvent type

See also

Unit

AdCalc

Declaration

type TGetExtendedVarEvent = procedure(Sender: TObject; VarName: string; var Found: boolean; var Value: extended) of Object;

Description

VarName - name of variable;

Found - should be assigned True if the variable is determined;

Value - should be assigned a value of Extended type.


TGetExtendedVarEvent type - See also
See also

OnGetExtendedVar event


TGetIntegerFunctEvent type

See also

Unit

AdCalc

Declaration

type TGetIntegerFunctEvent = procedure(Sender: TObject; FunctName: string; ParamValues: TFunctParamValues; var Found: boolean; var Value: Integer) of Object;

Description

FunctName - name of function;

ParamValues - types and values of parameters; ( first parameter - ParamValues[0] )

Found - should be assigned True if the function is determined;

Value - should be assigned the Integer type result value of function.


TGetIntegerFunctEvent type - See also
See also

OnGetIntegerFunct event


TGetIntegerVarEvent type

See also

Unit

AdCalc

Declaration

type TGetIntegerVarEvent = procedure(Sender: TObject; VarName: string; var Found: boolean; var Value: Integer) of Object;

Description

VarName - name of variable;

Found - should be assigned True if the variable is determined;

Value - should be assigned a value of Integer type.


TGetIntegerVarEvent type - See also
See also

OnGetIntegerVar event


TGetStringFunctEvent type

See also

Unit

AdCalc

Declaration

type TGetStringFunctEvent = procedure(Sender: TObject; FunctName: string; ParamValues: TFunctParamValues; var Found: boolean; var Value: string) of Object;

Description

FunctName - name of function;

ParamValues - types and values of parameters; ( first parameter - ParamValues[0] )

Found - should be assigned True if the function is determined;

Value - should be assigned the String type result value of function.


TGetStringFunctEvent type - See also
See also

OnGetStringFunct event


TGetStringVarEvent type

See also

Unit

AdCalc

Declaration

type TGetStringVarEvent = procedure(Sender: TObject; VarName: string; var Found: boolean; var Value: string) of Object;

Description

VarName - name of variable;

Found - should be assigned True if the variable is determined;

Value - should be assigned a value of String type.


TGetStringVarEvent type - See also
See also

OnGetStringVar event


TPriorityVar type

See also

Unit

AdCalc

Declaration

type TPriorityVar = (pvCode, pvAdCalc);


TPriorityVar type - See also
See also

ConnectBooleanVar

ConnectDateTimeVar

ConnectExtendedVar

ConnectIntegerVar

ConnectStringVar

DisconnectVar


TStringSign type

See also

Unit

AdCalc

Declaration

type TStringSign = (ssApostrophe, ssQMark);

Description

Sign for string ( '  " ).


TStringSign type - See also
See also

StringSign property


TVarListEvent type

See also

Unit

AdCalc

Declaration

type TVarListEvent = procedure(Sender: TObject; VarName: string; VarType: TExprType; Value: pointer; Description: string) of Object;

Description

VarName - name of variable;

VarType - type of variable;

Value - pointer to value of variable;

Description - description of variable.


TVarListEvent type - See also
See also

OnVarList event

GetVarList method