Method
Tests if a BCD number has a value of 0 (zero).
Category
BCD
Syntax
Function BcdIsZero(ByVal hBcd As Long) As Boolean
hBcd
The handle to the BCD number.
Example
hBCD = CF1.AllocBcd
tmpLong = 1
tmpLong2 = 0
CF1.LongToBcd tmpLong, hBCD
tmpVar = CF1.BcdIsZero(hBCD)
If CLng(tmpVar) = False And VarType(tmpVar) = vbBoolean Then
CF1.LongToBcd tmpLong2, hBCD
tmpVar = CF1.BcdIsZero(hBCD)
If CLng(tmpVar) = True And VarType(tmpVar) = vbBoolean Then
logWr "BCDIsZero OK"
Else
logWr "BCDIsZero failed with 0"
End If
Else
logWr "BCDIsZero failed with non-0"
End If
CF1.FreeBcd hBCD
Comments
BcdIsZero returns TRUE if the BCD number hBcd has a value of 0
(zero). If it does not, BcdIsZero returns FALSE.