TSingleHelper.Parse¶
Convert a string to a floating point value.
Declaration¶
Source position: syshelph.inc line 698
public
class function Parse(const AString: string) : Single; overload; static; overload;
class function Parse(const AString: string;
const AFormatSettings: TFormatSettings) : Single
; overload; static; overload;
Description¶
Parse will try to convert AString to a single-sized floating point value. It will take into account internationalization settings. (it uses FloatToStr).
Errors¶
If the string AString is not a valid floating-point value, a EConvertError exception is raised.
See also¶
| Name | Description |
|---|---|
| FloatToStr | Convert a float value to a string using a fixed format. |
| TSingleHelper.ToString | Convert a single-sized floating point value to a string. |
| TSingleHelper.TryParse | Try to convert a string to a single-sized floating point value. |