Sign in Join
FPDoc Onlineexperiment

TFPConstExpression class

In unit fpExprPars

Internally used class for constant value expressions

Declaration

pascal
TFPConstExpression = class(TFPExprNode)

Inheritance

  1. TFPConstExpression
  2. TFPExprNode
  3. 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

Properties

ConstValuepublicThe constant value stored in the expression

Methods

CreateStringpublicCreate constant expression with string value
CreateIntegerpublicCreate constant expression with integer value
CreateDateTimepublicCreate constant expression with datetime value
CreateFloatpublicCreate constant expression with float value
CreateBooleanpublicCreate constant expression with boolean value
CreateCurrencypublicCreate constant expression with currency value
CheckpublicValidate the constant expression
NodeTypepublicGet the result type for constant expressions
GetNodeValuepublicGet the constant value
AsStringpublicGet string representation of constant expression

Inherited

From TFPExprNode (6)

CheckNodeType HasAggregate InitAggregate IsAggregate NodeValue UpdateAggregate

From TObject (42)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance Create DefaultHandler DefaultHandlerStr Destroy Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.