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

TAggregateSum.ConvertArgument

Convert argument for sum aggregation

Declaration

Source position: fpexprpars.pp line 678

public function TAggregateSum.ConvertArgument(

  aIndex: Integer;

  aNode: TFPExprNode;

  aType: TResultType

):TFPExprNode; override;

Arguments

aIndex

  

The index of the argument to convert

aNode

  

The node containing the argument

aType

  

The type to convert the argument to

Function result

Returns the converted argument

Description

The ConvertArgument method converts an expression node argument to an appropriate numeric type for summation. It handles type conversion between different numeric types to ensure compatibility during the sum calculation process.

The method takes the argument index, the expression node containing the value, and the target result type, then performs the necessary conversion to make the value compatible with the sum operation.

This conversion ensures that mixed numeric types can be properly summed together while maintaining appropriate precision and avoiding type-related runtime errors.


Documentation generated on: Dec 15 2025