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

TMathOperation

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

Internally used class for mathematical operations in expressions

Declaration

Source position: fpexprpars.pp line 299

type TMathOperation = class(TFPBinaryOperation)

public

  procedure Check; override;

  

Validate the mathematical operation for correctness

  function NodeType; override;

  

Get the result type for mathematical operations

end;

Inheritance

TMathOperation

  

Internally used class for mathematical operations in expressions

|

TFPBinaryOperation

  

Internally used class for binary operations with left and right operands

|

TFPExprNode

  

Class for representing nodes in expression trees

|

TObject

Description

The TMathOperation class serves as a base class for mathematical operations that can be performed on numeric operands. It provides common functionality for arithmetic operations including type checking and result type determination.

Mathematical operations support various numeric types including integers, floats, and currency values, with automatic type promotion to ensure precision is maintained in calculations. The class ensures that operands are compatible for mathematical operations.

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