🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Sorting algorithms

#24
From: Matthew Phillips
Date: Wed, 25 Nov 2026 20:05
28 lines
2510 bytes
In message <5d3913ac38bob@sick-of-spam.invalid>
 on 17 Nov 2026 Bob Latham  wrote:

> In article <5d38c72b71Paul@sprie.nl>,
>    Paul Sprangers <Paul@sprie.nl> wrote:

>> A string is 'bigger' than another if it alphabetically comes after
>> the other one. "Sebastian Barthel" is bigger than "Sebestian Bach"!

>> The point is that BASIC only looks at the ASCII value of characters
>> for determining the alphabetical flow. Therefore it puts 'Céline'
>> after 'Coline', for example.

> For my 'Céline' fix i noticed that the possible problem characters
> are for the most part form &C0 upwards and so I simply have a
> substitution table for those chars which is only used in the
> comparison section, I don't actually change the characters.

You might like to consider the SWI Territory_Collate which has options to 
ignore both case and accents.  I see from RISC OS 5.22 onwards it can even 
interpret numbers in the string and sort them more naturally.

It will probably slow things down a little as a SWI will always be slower 
than an optimised routine in assembly language.

-- 
Matthew Phillips
Durham
Technical Details
Message-ID: <163f6e3d5d.Matthew@sinenomine.co.uk>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.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>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Matthew Phillips <spam2011m@yahoo.co.uk>
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Sorting algorithms
Date: Wed, 25 Nov 2026 20:05:38 GMT
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <163f6e3d5d.Matthew@sinenomine.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>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 25 Nov 2026 20:07:31 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="101023"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19ipHjnJFGOiNyI11y22DH/oNSSaWpprX4="; posting-host="a0a4a9632a167879536448c70b6e1af5"
User-Agent: Messenger-Pro/9.00 (MsgServe/9.00S) (RISC-OS/5.16) NewsHound/v1.54
Cancel-Lock: sha1:9lGUlzh07iywOQJ8Pucuj6cMTJY= sha256:988pLKrA8BKa2QIsASC4S03D/PHmPYyL/MVmgFGDp94=
	sha1:j9nVlfCNG3Y2nTnGOND/EBVI2ec= sha256:YkwchTz/nktopXWCi2XS63FzolYP1jAu1J2uuCN208s=
X-Editor: EmailEdit 2.04