[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'sysutils' (#rtl)

TryStrToFloat

Try to convert a string to a float.

Declaration

Source position: line 0

function TryStrToFloat(

  const S: String;

  var Value: Single

):Boolean;

function TryStrToFloat(

  const S: String;

  var Value: Double

):Boolean;

Description

TryStrToFloattries to convert the string Sto a floating point value, and stores the result in Value. It returns Trueif the operation was succesful, and Falseif it failed. This operation takes into account the system settings for floating point representations.

Errors

On error, Falseis returned.

See also

StrToFloat

  

Convert a string to a floating-point value.