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