Convert a String to an Integer
Convert a String to an Integer
Rate Convert a String to an Integer
(2(2 Vote))
Dim temp, ch As String
Dim i, mult As Integer
temp = s
i = 0
mult = 1
While Len(temp) <> 0
ch = Right(temp, 1)
i = i + mult * (Asc(ch) - Asc("0"))
mult = mult * 10
temp = Left(temp, Len(temp) - 1)
Wend
Str2Int = i
End Function
Convert a String to an Integer Comments
No comments yet — be the first to post one!
Post a Comment