Author Topic: Sorts in Masmlib  (Read 243 times)


  • Member
  • **
  • Posts: 221
    • LLC "AMS"
Re: Sorts in Masmlib
« Reply #15 on: March 23, 2020, 08:10:23 AM »
 I could mark, that for strings in C exists collate strings function - strcol  :eusa_boohoo:


  • Administrator
  • Member
  • ******
  • Posts: 7036
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Sorts in Masmlib
« Reply #16 on: March 23, 2020, 10:27:17 AM »
I should have explained, in QE its the tokeniser that strips out the high ascii, in order, load the text file, tokenise it then sort the tokenised array.
hutch at movsd dot com    :biggrin:  :skrewy:


  • Member
  • *****
  • Posts: 1150
  • I also want a stargate
Re: Sorts in Masmlib
« Reply #17 on: March 24, 2020, 09:02:22 PM »
Yes, don't you?

Me too. QSort() uses this order, also in case-insensitive mode.

It becomes more complex with Utf8 text or Umlaute (äöü), of course:
Code: [Select]
1.1 motiviation
1.2 Sorting in Java
1. unbelievable point
1 Introduction

Apparently, Java can do that. It's probably slow, because you need a lookup table to do that (QSort has one, but it's almost undocumented).

What is your specific problem, i.e. why do you need characters above Ascii 127? Just curious.
this would be interesting to make custom sort for:
look it seems like random order,almost like sort Roman numbers need to be,I=1,C=100,M=1000,X=10,but ascii in complete other order,C,I,M,X
Code: [Select]
1: 一
2: 二
3: 三
4: 四
5: 五
6: 六
7: 七
8: 八
9: 九
10: 十
11: 十一  十一
12: 十二 十二
20: 二十 二十
50: 五十 五十
100: 百 (Japanese: hyaku, Chinese: bai)
1000: 千 (Japanese: sen, Chinese: qian)
10,000:  万 (Japanese: man)
10,000:  萬 (Chinese: wan)
10^8: 億 (Japanese: oku)
10^8: 亿 亿 (Chinese: yi)
10^12: 兆 (Japanese: chou, Chinese: jhao)
Quote from Flashdance
Nick  :  When you give up your dream, you die
*wears a flameproof asbestos suit*
Gone serverside programming p:  :D
I love assembly,because its legal to write
princess:lea eax,luke