This will sort an dynamic array
This will sort an dynamic array
API Declarations
Dim max As Integer, i As Integer, j As Integer, so As Integer, textlength As Integer
Rate This will sort an dynamic array
(1(1 Vote))
textlength = Len(Text1.Text)
ReDim Preserve alltext(textlength)
ReDim Preserve sort(textlength)
For i = 1 To textlength
alltext(i) = Mid(Text1.Text, i, 1)
Next
For j = 1 To textlength
For i = 1 To textlength
If alltext(max) > alltext(i) Then
max = i
End If
Next
sort(so) = alltext(max)
alltext(max) = Chr(225)
so = so + 1
max = so
Next
For i = 1 To textlength
Text2.Text = Text2.Text + sort(i)
Next
End Sub
Private Sub Form_Load()
max = 1
so = 1
Load Form2
Form2.Show
Form2.Hide
End Sub
This will sort an dynamic array Comments
No comments yet — be the first to post one!
Post a Comment