Difference between revisions of "StrToFloat"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> function StrToFloat(s: string): Extended; </source> ==Availability== SCAR Divi 3.00 > Current ==Description== Converts a given...")
 
 
Line 8: Line 8:
  
 
==Description==
 
==Description==
Converts a given [[AnsiString|string]] '''s''' to an [[extended]] floating point value. If '''s''' is not a valid floating point value, the function throws an exception "Invalid float".
+
Converts a given [[string]] '''s''' to an [[extended]] floating point value. If '''s''' is not a valid floating point value, the function throws an exception "Invalid float".
  
 
==Example==
 
==Example==

Latest revision as of 18:05, 5 July 2011

Definition

function StrToFloat(s: string): 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, the function throws an exception "Invalid float".

Example

begin
  WriteLn(StrToFloat('1.5'));
end.

Output:

1,5

See Also