Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Alphabetical sort of characters within a string.
#3
Something like this ??

Code: (Select All)
'sorting alphabetically letters from a word

Dim CHARLET$(100)
A$ = "uncopyrightable "

For x = 1 To Len(A$): CHARLET$(x) = Mid$(A$, x, 1): Next

flag: f = 0
For y = 1 To Len(A$) - 1
     If CHARLET$(y) > CHARLET$(y + 1) Then Swap CHARLET$(y), CHARLET$(y + 1): f = 1
Next y: If f > 0 Then GoTo flag

B$ = "": For y = 1 To Len(A$): B$ = B$ + CHARLET$(y): Next y

Print A$ + "    --------->  " + B$

Input k$
Why not yes ?
Reply


Messages In This Thread
RE: Alphabetical sort of characters within a string. - by euklides - 04-24-2024, 02:42 PM



Users browsing this thread: 4 Guest(s)