TryParse(Value: String; Var Result: Currency): Boolean;
Value. The string value that should be converted to the Currency type.
Result. The variable, to which the value in case of successful conversion will be placed.
The TryParse method converts a string value into the type Currency with validation.
If conversion is successful, the method returns True, and the new value is placed into the variable specified in the Result parameter.
Sub UserProc;
Var
b: Boolean;
c: Currency;
s: String;
Begin
s := "234";
b := Currency.TryParse(s, c);
End Sub UserProc;
After executing the example in case of successful conversion the "b" variable contains True, and the "c" variable contains the 234 value.
See also: