Sign in Join
FPDoc Onlineexperiment

StrToFloatDef function

In unit sysutils

Convert a string to a float, with a default value.

Declaration

pascal
function StrToFloatDef(const S: string; const Default: Extended)
: Extended

Description

StrToFloatDef tries to convert the string S to a floating point value, and returns this value. If the conversion fails for some reason, the value Default is returned instead.

Errors

None. On error, the Default value is returned.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.