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

ArgToFloat

Convert argument to float value

Declaration

Source position: fpexprpars.pp line 843

function ArgToFloat(

  Arg: TFPExpressionResult

):TExprFloat;

Arguments

Arg

  

Expression argument to convert

Function result

Returns float representation of argument

Description

This utility function converts an TFPExpressionResult argument to a floating-point value. It handles conversion from various result types including integer, currency, and string representations to the standard TExprFloat type.

The function is primarily used internally by mathematical operations and built-in functions that require floating-point operands. It provides type safety by ensuring consistent conversion behavior across different numeric types.

If the argument cannot be converted to a valid floating-point value, appropriate error handling is performed to maintain expression evaluation integrity.


Documentation generated on: Dec 15 2025