Declaration¶
Source position: fpexprpars.pp line 299
type
TMathOperation = class(TFPBinaryOperation)
public
procedure Check;
function NodeType : TResultType;
end;
Inheritance¶
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.
Methods¶
| Member | Visibility | Description |
|---|---|---|
| Check | public | Validate the mathematical operation for correctness |
| NodeType | public | Get the result type for mathematical operations |
See also¶
| Name | Description |
|---|---|
| TFPExprNode | Class for representing nodes in expression trees |