emacs.d/clones/lisp/www.cs.cmu.edu/Groups/AI/html/cltl/clm/node21.html

54 lines
3 KiB
HTML
Raw Normal View History

2022-08-26 19:11:35 +02:00
<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
<!Converted with LaTeX2HTML 0.6.5 (Tue Nov 15 1994) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
<HEAD>
<TITLE>2.2. Characters</TITLE>
</HEAD>
<BODY>
<meta name="description" value=" Characters">
<meta name="keywords" value="clm">
<meta name="resource-type" value="document">
<meta name="distribution" value="global">
<P>
<b>Common Lisp the Language, 2nd Edition</b>
<BR> <HR><A NAME=tex2html1767 HREF="node22.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html1765 HREF="node15.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html1759 HREF="node20.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html1769 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html1770 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html1768 HREF="node22.html"> Standard Characters</A>
<B>Up:</B> <A NAME=tex2html1766 HREF="node15.html"> Data Types</A>
<B> Previous:</B> <A NAME=tex2html1760 HREF="node20.html"> Complex Numbers</A>
<HR> <P>
<H1><A NAME=SECTION00620000000000000000>2.2. Characters</A></H1>
<P>
Characters are represented as data objects of type <tt>character</tt>.
<P>
<img align=bottom alt="old_change_begin" src="gif/old_change_begin.gif"><br>
There are two subtypes of interest,
called <tt>standard-char</tt> and <tt>string-char</tt>.
<br><img align=bottom alt="old_change_end" src="gif/old_change_end.gif">
<P>
<img align=bottom alt="change_begin" src="gif/change_begin.gif"><br>
X3J13 voted in March 1989 (CHARACTER-PROPOSAL) <A NAME=872>&#160;</A> to remove the type <tt>string-char</tt>.
<br><img align=bottom alt="change_end" src="gif/change_end.gif">
<P>
A character object can be notated by writing <tt>#\</tt> followed
by the character itself. For example, <tt>#\g</tt> means the character
object for a lowercase g. This works well enough for printing
characters. Non-printing characters have names, and can be notated
by writing <tt>#\</tt> and then the name; for example, <tt>#\Space</tt>
(or <tt>#\SPACE</tt> or <tt>#\space</tt> or <tt>#\sPaCE</tt>)
means the space character. The syntax for character names after <tt>#\</tt>
is the same as that for symbols. However, only character names
that are known to the particular implementation may be used.
<P>
<HR>
<UL>
<LI> <A NAME=tex2html1771 HREF="node22.html#SECTION00621000000000000000"> Standard Characters</A>
<LI> <A NAME=tex2html1772 HREF="node23.html#SECTION00622000000000000000"> Line Divisions</A>
<LI> <A NAME=tex2html1773 HREF="node24.html#SECTION00623000000000000000"> Non-standard Characters</A>
<LI> <A NAME=tex2html1774 HREF="node25.html#SECTION00624000000000000000"> Character Attributes</A>
<LI> <A NAME=tex2html1775 HREF="node26.html#SECTION00625000000000000000"> String Characters</A>
</UL>
<HR>
<P><ADDRESS>
AI.Repository@cs.cmu.edu
</ADDRESS>
</BODY>