Method
Converts a long number to a BCD number.
Category
BCD
Syntax
Sub LongToBcd(ByVal Number As Long, ByVal hBcd As Long)
Number
The number that is to be converted.
hBcd
The handle to the BCD number.
Example
hBCD = CF1.AllocBcd
tmpLong = 10
CF1.LongToBcd tmpLong, hBCD
tmpVar = CF1.BcdToLong(hBCD)
If CLng(tmpVar) = tmpLong And VarType(tmpVar) = vbLong Then
logWr "LongToBCD and BCDToLong OK"
Else
logWr "LongToBCD or BCDToLong failed"
End If
CF1.FreeBcd hBCD
Comments
LongToBcd converts the long Number to a BCD number.