03-10-2026, 09:21 AM
@PhilOfPerth Variable length strings don't work with _MEM, so there's no easy way to use them with my MemSort routine. It'll work for all other base variable types, but can't handle variable length strings.
The only thing to do is:
1) You could make all your strings a fixed length and then it'd sort them. DIM array(10000) AS STRING * 20 <-- for example
2) Use a different sort routine to handle the variable length strings. For my personal use, I tend to package and use a combSort routine for most things. It's fast enough to handle anything I usually toss at it, it's non-recursive so there's no chance of blowing the stack, and it's simple enough for me to understand and alter if I ever need to change something with it.
If you want, I can share the routine I usually use for you. I'm certain it's here on the forums, and probably attached to a dozen different programs and examples from the years, but I'm too lazy and it's too late at night right now to hunt for them. If you want it, let me know, and I'll hunt it down once I get over this daylight swap jetlag which seems to be killing my energy levels.
The only thing to do is:
1) You could make all your strings a fixed length and then it'd sort them. DIM array(10000) AS STRING * 20 <-- for example
2) Use a different sort routine to handle the variable length strings. For my personal use, I tend to package and use a combSort routine for most things. It's fast enough to handle anything I usually toss at it, it's non-recursive so there's no chance of blowing the stack, and it's simple enough for me to understand and alter if I ever need to change something with it.
If you want, I can share the routine I usually use for you. I'm certain it's here on the forums, and probably attached to a dozen different programs and examples from the years, but I'm too lazy and it's too late at night right now to hunt for them. If you want it, let me know, and I'll hunt it down once I get over this daylight swap jetlag which seems to be killing my energy levels.


