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

TIfOperation.NodeType

Get the result type for conditional operation

Declaration

Source position: fpexprpars.pp line 270

public function TIfOperation.NodeType: TResultType; override;

Function result

Returns the result type of the conditional

Description

The NodeType method determines and returns the result type for the conditional operation based on the types of the then-branch and else-branch expressions. The result type is typically the common type that both branches can be converted to.

The method analyzes both branch expressions to determine a compatible result type that can accommodate values from either branch, ensuring type safety in conditional expressions.


Documentation generated on: Dec 15 2025