IsDouble () in VB6?

Is there any IsDouble () function in VB6? If I am not mistaken, the double data type in VB6 is equivalent to float in SQL Server 2000. Your advice would be greatly appreciated.

+3
source share
5 answers
Function IsDouble(ByVal varValue As Variant) As Boolean

   Dim dblTest As Double

   On Error Resume Next

   dblTest = CDbl(varValue)

   IsDouble = Err.Number = 0

End Function
+6
source

In fact, you are much better off using the Vartype function.

Private Function IsDouble(ByVal value As Variant) As Boolean
    IsDouble = (VarType(value) = vbDouble)
End Function
+10
source

IsNumeric() , , . , .. .

Immediate.

Debug.Print IsNumeric("4e308") 
False

VB6 Double - "VB6 64- (8-) IEEE -1.79769313486232E308 -4,94065645841247E-324 4.94065645841247E-324 1.79769313486232E308 ".

, , SQL Server, docs. " , : -1.79E + 308-2.23E - 308, 0 2.23E + 308 - 1.79E + 308."

+3

VB6 IsDouble, IsNumeric. :

Function IsDouble(ByVal value As Variant) As Boolean

   Dim convertedValue As Double

On Error Goto EH
   convertedValue = CDbl(value)
   IsDouble = True

Exit Function
   EH:
        IsDouble = False
End Function
+1

IsNumeric(), . , , ?

0

Source: https://habr.com/ru/post/1706123/


All Articles