Private Sub Command3_Click()
Dim a, b As Integer
Dim divide As Double
a = 10
b = 3
divide = div(a, b)
MsgBox (divide)
End Sub
Private Function div(a, b)
div = a / b
End Function
Function return type by default is integer in C. & if we do the same prog in C,it returns 3 not 3.333333....But in VB the function return type is Variant????Right or Wrong?
variant is data type which can hold the data of any type like integer,string,double...Right or wrong?
I want that the fn. return can integer value only by default, if we write
Private Function div(a, b) as double
only then it returns decimal value??
Plz reply frnds.:(