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

TFPConstExpression

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Internally used class for constant value expressions

Declaration

Source position: fpexprpars.pp line 472

type TFPConstExpression = class(TFPExprNode)

public

  constructor CreateString();

  

Create constant expression with string value

  constructor CreateInteger();

  

Create constant expression with integer value

  constructor CreateDateTime();

  

Create constant expression with datetime value

  constructor CreateFloat();

  

Create constant expression with float value

  constructor CreateBoolean();

  

Create constant expression with boolean value

  constructor CreateCurrency();

  

Create constant expression with currency value

  procedure Check; override;

  

Validate the constant expression

  function NodeType; override;

  

Get the result type for constant expressions

  procedure GetNodeValue(); override;

  

Get the constant value

  function AsString; override;

  

Get string representation of constant expression

  property ConstValue: TFPExpressionResult; [r]

  

The constant value stored in the expression

end;

Inheritance

TFPConstExpression

  

Internally used class for constant value expressions

|

TFPExprNode

  

Class for representing nodes in expression trees

|

TObject

Description

The TFPConstExpression class represents constant literal values in expressions, storing fixed values that do not change during expression evaluation. It provides the foundation for all literal constants including strings, integers, floats, booleans, and date/time values.

Constant expressions are the leaf nodes of expression trees that provide actual data values rather than computed results. They are essential building blocks that supply the raw data that other expression nodes operate on.

The class handles various data types through different constructor methods and provides type-safe storage and retrieval of constant values during expression evaluation.

This class is used internally by the TFPExpressionParser class to construct an AST (Abstract Syntax Tree). There is normally no need for you to use or instantiate this class directly.

See also

TFPExprNode

  

Class for representing nodes in expression trees


Documentation generated on: Dec 15 2025