RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
FMTBcd.TryStrToBcd Function

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

Pascal
function TryStrToBcd(const AValue: string; var Bcd: TBcd): Boolean;
C++
Boolean TryStrToBcd(const AnsiString AValue, TBcd Bcd);

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!