Skip to content

TFPPowerOperation

Internally used class for power/exponentiation operations

Declaration

Source position: fpexprpars.pp line 354

type

  TFPPowerOperation = class(TMathOperation)
  public
    procedure Check;
    function AsString : AnsiString;
    function NodeType : TResultType;
    procedure GetNodeValue;
  end;

Description

The TFPPowerOperation class implements the power (exponentiation) operation for raising one numeric value to the power of another. It extends the mathematical operation framework to provide exponentiation functionality with proper type handling.

The power operation supports integer, float, and currency operands, automatically promoting the result type to ensure sufficient precision. The operation follows standard mathematical rules for exponentiation including handling of negative bases and fractional exponents.

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.

Methods

Member Visibility Description
AsString public Get string representation of power operation
Check public Validate the power operation for correctness
GetNodeValue public Calculate the result of power operation
NodeType public Get the result type for power operations
See all Methods

See also

Name Description
TFPExprNode Class for representing nodes in expression trees