Unit 'fpexprpars' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#fcl]

TFPExprIdentifierDefs.AddVariable

Add a variable to the identifier collection

Declaration

Source position: fpexprpars.pp line 587

public function TFPExprIdentifierDefs.AddVariable(

  const AName: ShortString;

  AResultType: TResultType;

  ACallback: TFPExprVariableCallBack

):TFPExprIdentifierDef;

function TFPExprIdentifierDefs.AddVariable(

  const AName: ShortString;

  AResultType: TResultType;

  ACallback: TFPExprVariableEvent

):TFPExprIdentifierDef;

function TFPExprIdentifierDefs.AddVariable(

  const AName: ShortString;

  AResultType: TResultType;

  const AValue: AnsiString

):TFPExprIdentifierDef;

Arguments

AName

  

The name of the variable

AResultType

  

The result type of the variable

ACallback

  

The callback for variable evaluation

Function result

Returns the added variable identifier

Arguments

AName

  

The name of the variable

AResultType

  

The result type of the variable

ACallback

  

The callback for variable evaluation

Arguments

AName

  

The name of the variable

AResultType

  

The result type of the variable

AValue

  

The value of the variable

Description

The AddVariable method creates and adds a new variable identifier to the collection with the specified name and value. The variable can then be referenced in expressions by its name to retrieve the stored value.


Documentation generated on: Dec 15 2025