Article View: comp.std.internat
Article #775Re: Character representation
From: Anders Andersson
Date: Sat, 22 Aug 1987 21:55
Date: Sat, 22 Aug 1987 21:55
22 lines
1906 bytes
1906 bytes
In article <2201@enea.UUCP> sommar@enea.UUCP(Erland Sommarskog) writes:
>> if (coll[c] >= FIRST_CHAR && coll[c] <= LAST_CHAR)
> Of course I know about look-tables. I have myself written a programme
>that uses a two-level look-up table for comparing words. (And the words
>are transcribed in three levels. You don't want the hyphen in a hyphenated
>word to be significant.) But to have that in every single programme that
>does string comparisons. No, thank you. It does increase the complexity
>and the readability of the code.
Nobody coding an application should of course ever have to implement those
string comparison routines explicitely over and over again, but rather
refer to generec library routines, like isalpha(c). Several libraries can
be provided for different kinds of sorting (if you want "RFC666.TXT" after
"RFC-INDEX.TXT" but "RFC888.TXT" before because of the way numbers are
spelled out, that's up to your choice). If the string comparison library
is too big to be linked into your 42 executables, then provide it as a
sharable image, or (in an emergency) put it in your favourite kernel...
--
Anders Andersson, Dept. of Computer Systems, Uppsala University, Sweden
Phone: +46 18 183170
UUCP: andersa@kuling.UUCP (...!{seismo,mcvax}!enea!kuling!andersa)
Technical Details
Message-ID:
<479@kuling.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!mcvax!enea!kuling!andersaReferences:
<2171@enea.UUCP> <709@maccs.UUCP> <2183@enea.UUCP> <719@maccs.UUCP> <2201@enea.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!mcvax!enea!kuling!andersa From: andersa@kuling.UUCP (Anders Andersson) Newsgroups: comp.std.internat Subject: Re: Character representation Message-ID: <479@kuling.UUCP> Date: Sat, 22-Aug-87 17:55:18 EDT Article-I.D.: kuling.479 Posted: Sat Aug 22 17:55:18 1987 Date-Received: Sun, 23-Aug-87 21:43:41 EDT References: <2171@enea.UUCP> <709@maccs.UUCP> <2183@enea.UUCP> <719@maccs.UUCP> <2201@enea.UUCP> Reply-To: andersa@kuling.UUCP (Anders Andersson) Organization: Uppsala University, Sweden Lines: 22