Data.FmtBcd.TryStrToBcd

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function TryStrToBcd(const AValue: string; var Bcd: TBcd): Boolean;
function TryStrToBcd(const AValue: string; var Bcd: TBcd; Format: TFormatSettings): Boolean;

C++

extern DELPHI_PACKAGE bool __fastcall TryStrToBcd(const System::UnicodeString AValue, TBcd &Bcd)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
Data.FmtBcd.pas
Data.FMTBcd.hpp
Data.FmtBcd Data.FmtBcd

Description

Converts a string to the corresponding binary-coded decimal (BCD) value.

Use TryStrToBcd to convert a string into a binary-coded decimal value. The decimals and precision are inferred from the digits present in the string.

TryStrToBcd converts the string specified by aValue and returns the resulting BCD value as Bcd.

TryStrToBcd returns true if it successfully converts aValue to a TBcd value. If aValue can't be successfully converted to a TBcd value, TryStrToBcd returns false.

See Also