StrToFloatDef

From SCAR Divi Manual
Revision as of 18:07, 5 July 2011 by Freddy (talk | contribs) (Example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Definition

function StrToFloatDef(s: AnsiString; def: Extended): Extended;

Availability

SCAR Divi 3.00 > Current

Description

Converts a given string s to an extended floating point value. If s is not a valid floating point value, value given by def is returned.

Example

begin
  WriteLn(StrToFloatDef('1.5', 3));
  WriteLn(StrToFloatDef('s', 1.5));
end.

Output:

1,5
1,5

See Also