🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.acorn.programmer
Article #27

Re: Sorting algorithms

#27
From: Harriet Bazley
Date: Thu, 26 Nov 2026 22:32
52 lines
2915 bytes
On 26 Nov 2026 as I do recall,
          Jean-Michel  wrote:

> In message <5d3d73e064bob@sick-of-spam.invalid>
>           Bob Latham <bob@sick-of-spam.invalid> wrote:
> 
> > In article <163f6e3d5d.Matthew@sinenomine.co.uk>,
> >    Matthew Phillips <spam2011m@yahoo.co.uk> wrote:
> 
> >> You might like to consider the SWI Territory_Collate which has
> >> options to ignore both case and accents.
> 
> > That's interesting, thanks for that.
> 
> Yes, but don't forget Céline is Canadian/French...
> 
I only have Territory 1 (UK) on this computer so can't use other
territory numbers to test, but Territory_Collate certainly sorts Céline
and Coline correctly for me...


DIM block% 256

DATA Céline,Celine,Celine1,Celia,Coline,XXX
items%=0: name$=""
WHILE name$<>"XXX"
  READ name$
  PRINT name$
  $(block%+items%*16)=name$+CHR$(0)
  items%+=1
ENDWHILE

items%-=1

PRINT "Press space bar to repeat, or any other key to end"

REPEAT
  str2%=RND(items%)-1
  SYS"Territory_Collate",-1,block%,block%+str2%*16,3 TO result%
  PRINT result%
  CASE TRUE OF
  WHEN result%>0:outcome$="greater than"
  WHEN result%=0:outcome$="equal to"
  WHEN result%<0:outcome$="less than"
  ENDCASE
  PRINT $block%;" is ";outcome$;" ";$(block%+str2%*16)
UNTIL GET<>32

-- 
Harriet Bazley                     ==  Loyaulte me lie ==

ObChocolate:  Nice!
Technical Details
Message-ID: <7d8cff3d5d.harriet@bazleyfamily.co.uk>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <5d336712aebob@sick-of-spam.invalid> <5d3622ac84Paul@sprie.nl> <5d3628e1b7News04@avisoft.f9.co.uk> <5d362f6206Paul@sprie.nl> <11dfi5o$1l3bi$1@solani.org> <5d38c72b71Paul@sprie.nl> <5d3913ac38bob@sick-of-spam.invalid> <163f6e3d5d.Matthew@sinenomine.co.uk> <5d3d73e064bob@sick-of-spam.invalid> <40bfc43d5d.jmb@jmc.bruck.orange.fr>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Harriet Bazley <harriet@bazleyfamily.co.uk>
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Sorting algorithms
Date: Thu, 26 Nov 2026 22:32:43 GMT
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <7d8cff3d5d.harriet@bazleyfamily.co.uk>
References: <5d336712aebob@sick-of-spam.invalid> <5d3622ac84Paul@sprie.nl> <5d3628e1b7News04@avisoft.f9.co.uk> <5d362f6206Paul@sprie.nl> 
 <11dfi5o$1l3bi$1@solani.org> <5d38c72b71Paul@sprie.nl> <5d3913ac38bob@sick-of-spam.invalid> <163f6e3d5d.Matthew@sinenomine.co.uk> 
 <5d3d73e064bob@sick-of-spam.invalid> <40bfc43d5d.jmb@jmc.bruck.orange.fr>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 26 Nov 2026 22:50:40 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="1204285"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1++orWOI2PkJME+1mTr7u5z8CkS2qlyPzI="; posting-host="36a90f7b9c6dd019db1367a74906c172"
User-Agent: Messenger-Pro/10.00 (MsgServe/9.03) (RISC-OS/5.31) NewsHound/v1.53-32 RC1
Cancel-Lock: sha1:ZKUTobRbIRR5/l2X6cOFPCruzr0= sha256:+wGHzKxbHm6VY7ECeR1uq48W47SIJgPZG801KqlpSOM=
	sha1:2RSpmm5Z4bdAIaLoFO6c/SKekog= sha256:AXNas2AwmyZTxrGGrrepf/Yx+Sh2Fnrt42l79lDpZZE=
X-Clacks-Overhead: GNU Terry Pratchett