Лабораторная работа: Перевод целых неотрицательных чисел в различных системах счисления
inp.MaxLength = 15
On Error GoTo err:
If inp.Text = "" Then
out.Text = ""
Exit Sub
Else
i = 1
x0 = val(inp.Text)
If x0 >= 0 And x0 <= 7 Then
out.Text = inp.Text
Exit Sub
Else
Do
d(i) = val(x0 - (val(x0 / 8) * 8))
x = val(x0 / 8)
If x >= 0 And x <= 7 Then
i = i + 1
d(i) = x
Exit Do
Else
i = i + 1
x0 = x
End If
Loop Until x = 1
out.Text = ""
Do
out.Text = val(out.Text) & val(d(i))
i = i - 1
Loop Until i = 0