Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Alphabetical sort of characters within a string.
#4
Code: (Select All)
'an other way

A$ = "uncopyrightable "
B$ = A$

Flag: F = 0
For x = 1 To Len(B$) - 1
    L1$ = Mid$(B$, x, 1): L2$ = Mid$(B$, x + 1, 1)
    If L1$ > L2$ Then Mid$(B$, x, 1) = L2$: Mid$(B$, x + 1, 1) = L1$: F = 1
Next: If F > 0 Then GoTo Flag
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:50 PM



Users browsing this thread: 3 Guest(s)