Method
Tests whether a BCD number is negative.
Category
BCD
Syntax
Function BcdIsNegative(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.BcdIsNegative(hBCD)
If CLng(tmpVar) = False And VarType(tmpVar) = vbBoolean Then
CF1.LongToBcd tmpLong2, hBCD
tmpVar = CF1.BcdIsNegative(hBCD)
If CLng(tmpVar) = True And VarType(tmpVar) = vbBoolean Then
logWr "BcdIsNegative OK"
Else
logWr "BcdIsNegative failed with -1"
End If
Else
logWr "BcdIsNegative failed with 0"
End If
CF1.FreeBcd hBCD
Comments
BcdIsNegative returns TRUE if the BCD number hBcd has a value that
is less than 0 (zero). If it is not less than zero, BcdIsNegative
returns FALSE.