TryParse(Value: String; Var Result: Double): Boolean;
Value - string value that must be converted into real type.
Result - variable, into which the value in case of successful conversion will be placed.
The TryParse method converts a string value into the Double type with validation. If conversion is successful, the method returns True, and the new value is placed into the variable specified in the Result input parameter.
Sub Main;
Var
b: Boolean;
d: Double;
s: String;
Begin
s := "234.234";
b := Double.TryParse(s, d);
End Sub Main;
After executing the example, if the "b" variable will contain True, the conversion is successful, and the "d" variable will contain the value 234.234.
See also: