TAggregateSum.ConvertArgument function
Convert argument for sum aggregation
Declaration
function ConvertArgument(aIndex: Integer; aNode: TFPExprNode;
aType: TResultType): TFPExprNode; overrideArguments
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.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
