Sign in Join
FPDoc Onlineexperiment

TMathOperation.NodeType function

Member of TMathOperationpublicIn unit fpExprPars

Get the result type for mathematical operations

Declaration

pascal
function NodeType: TResultType; override

Function result

Returns the result type of the math operation

Description

The NodeType method determines the data type that will be produced by the mathematical operation. The result type is calculated based on the types of the operands and follows standard type promotion rules.

For example, operations between integers produce integer results, but operations involving floats promote the result to float type to maintain precision. Currency operations maintain currency type where appropriate.

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