11-18-2022, 12:06 AM
I'm working on a prog that needs to sort a string, by swapping elements of the string.
From the description of SWAP in Help, I can do this by naming the elements, but I can't get this to work! In the small sample, the SWAP line is illegal. What am I doing wrong? Obviously, that line was not accepted, as it didn't get capitalized.
Code: (Select All)
Screen 9
_FullScreen
a$ = "ABCDEFG"
Print Mid$(a$, 3, 1), Mid$(a$, 5, 1)
swap mid$(a$,3,1),mid$(a$,5,1)
?a$
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.)
Please visit my Website at: http://oldendayskids.blogspot.com/
Please visit my Website at: http://oldendayskids.blogspot.com/