Unit 'sysutils' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

TryStrToFloat

Try to convert a string to a float.

Declaration

Source position: sysstrh.inc line 204

function TryStrToFloat(

  const S: string;

  out Value: Single

):Boolean;

function TryStrToFloat(

  const S: string;

  out Value: Single;

  const FormatSettings: TFormatSettings

):Boolean;

function TryStrToFloat(

  const S: string;

  out Value: Double

):Boolean;

function TryStrToFloat(

  const S: string;

  out Value: Double;

  const FormatSettings: TFormatSettings

):Boolean;

function TryStrToFloat(

  const S: string;

  out Value: Extended

):Boolean;

function TryStrToFloat(

  const S: string;

  out Value: Extended;

  const FormatSettings: TFormatSettings

):Boolean;

Description

TryStrToFloat tries to convert the string S to a floating point value, and stores the result in Value. It returns True if the operation was successful, and False if it failed. This operation takes into account the system settings for floating point representations.

Errors

On error, False is returned.

See also

StrToFloat

  

Convert a string to a floating-point value.


Documentation generated on: Nov 23 2024