11-18-2022, 12:46 AM
(This post was last modified: 11-18-2022, 12:48 AM by PhilOfPerth.)
Thanks for that!
You pointed me in the right direction, but I still don't really understand why I can't just swap the two elements.
But if I don't use the SWAP function, I can just do this:
It introduces two new variables, but that's ok in my case. I'll look at using ASC instead of mid$ too, though speed is not important in my case either.
You pointed me in the right direction, but I still don't really understand why I can't just swap the two elements.
But if I don't use the SWAP function, I can just do this:
Code: (Select All)
a$ = "ABCDEFG"
Print a$
t1$ = Mid$(a$, 3, 1): t2$ = Mid$(a$, 5, 1)
Mid$(a$, 3, 1) = t2$: Mid$(a$, 5, 1) = t1$
Print a$
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.)