47 lines
6.2 KiB
HTML
47 lines
6.2 KiB
HTML
<!-- Common Lisp HyperSpec (TM), version 7.0 generated by Kent M. Pitman on Mon, 11-Apr-2005 2:31am EDT -->
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>CLHS: Section 13.1.6</TITLE>
|
|
<LINK HREF="../Data/clhs.css" REL="stylesheet" TYPE="text/css" />
|
|
<META HTTP-EQUIV="Author" CONTENT="Kent M. Pitman">
|
|
<META HTTP-EQUIV="Organization" CONTENT="LispWorks Ltd.">
|
|
<LINK REL=TOP HREF="../Front/index.htm">
|
|
<LINK REL=COPYRIGHT HREF="../Front/Help.htm#Legal">
|
|
<LINK REL=DISCLAIMER HREF="../Front/Help.htm#Disclaimer">
|
|
<LINK REL=PREV HREF="13_ae.htm">
|
|
<LINK REL=UP HREF="13_a.htm">
|
|
<LINK REL=NEXT HREF="13_ag.htm">
|
|
</HEAD>
|
|
<BODY>
|
|
<H1><A REV=MADE HREF="http://www.lispworks.com/"><IMG WIDTH=80 HEIGHT=65 ALT="[LISPWORKS]" SRC="../Graphics/LWSmall.gif" ALIGN=Bottom></A><A REL=TOP HREF="../Front/index.htm"><IMG WIDTH=237 HEIGHT=65 ALT="[Common Lisp HyperSpec (TM)]" SRC="../Graphics/CLHS_Sm.gif" ALIGN=Bottom></A> <A REL=PREV HREF="13_ae.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="13_a.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="13_ag.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
|
|
|
|
<HR>
|
|
|
|
<H2>
|
|
13.1.6 Ordering of Characters</H2> <P>
|
|
The total ordering on <A REL=DEFINITION HREF="26_glo_c.htm#character"><I>characters</I></A> is guaranteed to have the following properties: <P>
|
|
<P><DL><P>
|
|
<P>
|
|
<DT>* If two <A REL=DEFINITION HREF="26_glo_c.htm#character"><I>characters</I></A> have the same <A REL=DEFINITION HREF="26_glo_i.htm#implementation-defined"><I>implementation-defined</I></A> <A REL=DEFINITION HREF="26_glo_a.htm#attribute"><I>attributes</I></A>, then their ordering by <A REL=DEFINITION HREF="f_chareq.htm#charLT"><B>char<</B></A> is consistent with the numerical ordering by the predicate <A REL=DEFINITION HREF="f_eq_sle.htm#LT"><B><</B></A> on their code <A REL=DEFINITION HREF="26_glo_a.htm#attribute"><I>attributes</I></A>. <P><DD>
|
|
<DT>* If two <A REL=DEFINITION HREF="26_glo_c.htm#character"><I>characters</I></A> differ in any <A REL=DEFINITION HREF="26_glo_a.htm#attribute"><I>attribute</I></A>, then they are not <A REL=DEFINITION HREF="f_chareq.htm#charEQ"><B>char=</B></A>. <P><DD>
|
|
<P>
|
|
<DT>* The total ordering is not necessarily the same as the total ordering on the <A REL=DEFINITION HREF="26_glo_i.htm#integer"><I>integers</I></A> produced by applying <A REL=DEFINITION HREF="f_char_i.htm#char-int"><B>char-int</B></A> to the <A REL=DEFINITION HREF="26_glo_c.htm#character"><I>characters</I></A>. <P><DD>
|
|
<DT>* While <A REL=DEFINITION HREF="26_glo_a.htm#alphabetic"><I>alphabetic</I></A>[1] <A REL=DEFINITION HREF="26_glo_s.htm#standard_character"><I>standard characters</I></A> of a given <A REL=DEFINITION HREF="26_glo_c.htm#case"><I>case</I></A> must obey a partial ordering, they need not be contiguous; it is permissible for <A REL=DEFINITION HREF="26_glo_u.htm#uppercase"><I>uppercase</I></A> and <A REL=DEFINITION HREF="26_glo_l.htm#lowercase"><I>lowercase</I></A> <A REL=DEFINITION HREF="26_glo_c.htm#character"><I>characters</I></A> to be interleaved. Thus <TT>(char<= #\a x #\z)</TT> is not a valid way of determining whether or not <TT>x</TT> is a <A REL=DEFINITION HREF="26_glo_l.htm#lowercase"><I>lowercase</I></A> <A REL=DEFINITION HREF="26_glo_c.htm#character"><I>character</I></A>. <P><DD>
|
|
<P>
|
|
<P></DL><P>
|
|
Of the <A REL=DEFINITION HREF="26_glo_s.htm#standard_character"><I>standard characters</I></A>, those which are <A REL=DEFINITION HREF="26_glo_a.htm#alphanumeric"><I>alphanumeric</I></A> obey the following partial ordering: <P>
|
|
<PRE>
|
|
A<B<C<D<E<F<G<H<I<J<K<L<M<N<O<P<Q<R<S<T<U<V<W<X<Y<Z
|
|
a<b<c<d<e<f<g<h<i<j<k<l<m<n<o<p<q<r<s<t<u<v<w<x<y<z
|
|
0<1<2<3<4<5<6<7<8<9
|
|
either 9<A or Z<0
|
|
either 9<a or z<0
|
|
</PRE>
|
|
</TT> This implies that, for <A REL=DEFINITION HREF="26_glo_s.htm#standard_character"><I>standard characters</I></A>, <A REL=DEFINITION HREF="26_glo_a.htm#alphabetic"><I>alphabetic</I></A>[1] ordering holds within each <A REL=DEFINITION HREF="26_glo_c.htm#case"><I>case</I></A> (<A REL=DEFINITION HREF="26_glo_u.htm#uppercase"><I>uppercase</I></A> and <A REL=DEFINITION HREF="26_glo_l.htm#lowercase"><I>lowercase</I></A>), and that the <A REL=DEFINITION HREF="26_glo_n.htm#numeric"><I>numeric</I></A> <A REL=DEFINITION HREF="26_glo_c.htm#character"><I>characters</I></A> as a group are not interleaved with <A REL=DEFINITION HREF="26_glo_a.htm#alphabetic"><I>alphabetic</I></A> <A REL=DEFINITION HREF="26_glo_c.htm#character"><I>characters</I></A>. However, the ordering or possible interleaving of <A REL=DEFINITION HREF="26_glo_u.htm#uppercase"><I>uppercase</I></A> <A REL=DEFINITION HREF="26_glo_c.htm#character"><I>characters</I></A> and <A REL=DEFINITION HREF="26_glo_l.htm#lowercase"><I>lowercase</I></A> <A REL=DEFINITION HREF="26_glo_c.htm#character"><I>characters</I></A> is <A REL=DEFINITION HREF="26_glo_i.htm#implementation-defined"><I>implementation-defined</I></A>. <P>
|
|
<P><HR>The following <A REL=META HREF="../Front/X3J13Iss.htm">X3J13 cleanup issue</A>, <I>not part of the specification</I>, applies to this section:<P><UL><LI> <A REL=CHILD HREF="../Issues/iss027.htm">CHARACTER-PROPOSAL:2-1-1</A><P></UL><HR>
|
|
|
|
<A REL=NAVIGATOR HREF="../Front/StartPts.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Starting Points]" SRC="../Graphics/StartPts.gif" ALIGN=Bottom></A><A REL=TOC HREF="../Front/Contents.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Contents]" SRC="../Graphics/Contents.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Master.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Index]" SRC="../Graphics/Index.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Symbol.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Symbols]" SRC="../Graphics/Symbols.gif" ALIGN=Bottom></A><A REL=GLOSSARY HREF="../Body/26_a.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Glossary]" SRC="../Graphics/Glossary.gif" ALIGN=Bottom></A><A HREF="../Front/X3J13Iss.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Issues]" SRC="../Graphics/Issues.gif" ALIGN=Bottom></A><BR>
|
|
|
|
<A REL=COPYRIGHT HREF="../Front/Help.htm#Legal"><I>Copyright 1996-2005, LispWorks Ltd. All rights reserved.</I></A><P>
|
|
</BODY>
|
|
</HTML>
|