I want my application to take the all the names of groups in an INI file and arrange them alphabetically. How do I do that? Any extensions that do the trick or a condition or action I missed?
Thanks in advance
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
heres the c++ way to do it lol. i just learned this.
numerically is easy in mmf. alhabetically may be tougher. is there a way to compare strings in mmf?
void sort(int a[], int words)//the array 'a' is the index of all the numbers to be sorted.
{
for (int k = 1; k < words; k++)
{
for (int r = 0; r < words - k; r++)
{
if (a[r] > a[r + 1])//compares the if the current number in the index[r] is greater than the next.
{
swap(a[r], a[r + 1]);//swaps the position of the two numbers if it is
}
}
}
}
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
You could squeeze all the "things" into a Magic Deque, one of my favorite objects. They can sort both strings and numbers, but there are a lot of alternative ways. You could use Sort X, Stringsort X, Dynamic Array, or write your own with a standard array using cec!ls example
But I recommend learning Magic Deque thoroughly. Very powerful object.
Thanks! I'll try that. MMF has too many extensions, lol. I used to download all of them, hoping to use them when I need them, but I never remember which of them can do what I want them to do.
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.