Class TCalculator (unit calc)

Inherits from

TPersistent

Constructors


constructor Create;

// TCalculator component


Functions

procedure ClearVars;


destructor Destroy;


function NameOf(Index: Word): String;


function Callback(ctype: TCalcCBType; const Name: String; var Res: Double): Boolean;


function GetResult: Double;


function GetVar(const Name: String): Double;


procedure SetVar(const Name: String; value: Double);


Properties

property Expression : String


property Result : Double


property Vars : Double


Events

Variables

FExpression : String;


FVars : TList;



Constructors


constructor Create;

// TCalculator component


Functions


procedure ClearVars;


destructor Destroy;


function NameOf(Index: Word): String;


function Callback(ctype: TCalcCBType; const Name: String; var Res: Double): Boolean;


function GetResult: Double;


function GetVar(const Name: String): Double;


procedure SetVar(const Name: String; value: Double);


Properties


property Expression : String


property Result : Double


property Vars : Double


Events


Variables


FExpression : String;


FVars : TList;