12-27-2025, 01:57 PM
Quote:@Kernalpanic Sure, that works, but it works *slow*. Run it a few thousand times and see how long it takes to separate strings and then add them back together like that. I was showing you a nice fast way to do this (with a few careful limitations). Using strings like this is simply inherently sloooow due to the internals and use of temp strings and string clean up and sting copying and all sorts of stuff like that going on behind the scene.Yes, if there are more changes than one need two files, I think so and have to put them in a loop. The crucial question, however, is whether the same positions should always be swapped between the two files. For example:![]()
1st file: Letters
2nd file: Numbers
The positions 2, 3, 4 in the letters should always be swapped with positions 6, 7, 8 in the numbers. Only then does a loop make sense. Is there using _Mem$ faster than using instructions from QB? When using _Mem$, one have to write to memory and then read it back.
But if the positions to be swapped alternate between letters and numbers, then the user has to intervene, and then one can forget about the time. - Or one need a third file from which the changing positions can be read. It's all very complicated.

