FMX.Text.TryTextToValue

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function TryTextToValue(AText: string; var AValue: Single; DefaultValue: Single): boolean;

C++

extern DELPHI_PACKAGE bool __fastcall TryTextToValue(System::UnicodeString AText, float &AValue, float DefaultValue);

Properties

Type Visibility Source Unit Parent
function public
FMX.Text.pas
FMX.Text.hpp
FMX.Text FMX.Text

Description

Converts the text to a numeric value and returns if the operation was successful.

TryTextToValue returns True if the conversion succeeds and False otherwise. The result of the conversion is stored in the AValue parameter. If the conversion is not successful, DefaultValue is assigned to AValue.

See Also