In the message boxes all the time displays 1. But if you remove the first line (the line with the division) from the first function, everything is fine.
What is it connected with and what should I do? Help me please.
Function char_in_2(x As Integer) x = x \ 2 char_in_2 = x End Function Function nayti(dlina As Integer) Dim i As Integer i = 0 Do While char_in_2(i) <> dlina i = i + 1 MsgBox i Loop nayti = i End Function Sub Test1() MsgBox nayti(7) End Sub