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

69 lines
4.1 KiB
HTML

<!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.4. Character Attributes</TITLE>
</HEAD>
<BODY>
<meta name="description" value=" Character Attributes">
<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=tex2html1820 HREF="node26.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html1818 HREF="node21.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html1812 HREF="node24.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html1822 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html1823 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html1821 HREF="node26.html"> String Characters</A>
<B>Up:</B> <A NAME=tex2html1819 HREF="node21.html"> Characters</A>
<B> Previous:</B> <A NAME=tex2html1813 HREF="node24.html"> Non-standard Characters</A>
<HR> <P>
<img align=bottom alt="old_change_begin" src="gif/old_change_begin.gif"><br>
<H2><A NAME=SECTION00624000000000000000>2.2.4. Character Attributes</A></H2>
<P>
Every object of type <tt>character</tt>
has three attributes: <i>code</i>, <i>bits</i>, and <i>font</i>.
The code attribute is intended to distinguish among the printed glyphs
and formatting functions for characters; it is a numerical encoding
of the character proper.
The bits attribute allows extra
flags to be associated with a character. The font attribute permits
a specification of the style of the glyphs (such as italics).
Each of these attributes may be understood to be a non-negative integer.
<P>
The font attribute may be notated in unsigned decimal notation
between the <tt>#</tt> and the <tt>\</tt>. For example,
<tt>#3\a</tt> means the letter <tt>a</tt> in font 3.
This might mean the same thing as <tt>#\<IMG ALIGN=BOTTOM ALT="" SRC="_24769_tex2html_wrap40236.gif"></tt> if font 3
were used to represent Greek letters.
Note that not all Common Lisp implementations provide for non-zero
font attributes; see <tt>char-font-limit</tt>.
<P>
The bits attribute may be notated
by preceding the name of the character by the names or initials
of the bits,
separated by hyphens. The character itself may be written
instead of the name, preceded if necessary by <tt>\</tt>. For example:
<P><pre>
#\Control-Meta-Return #\Meta-Control-Q
#\Hyper-Space #\Meta-\a
#\Control-A #\Meta-Hyper-\:
#\C-M-Return #\Hyper-\<IMG ALIGN=BOTTOM ALT="" SRC="_24769_tex2html_wrap40211.gif">
</pre><P>
Note that not all Common Lisp implementations provide for non-zero
bits attributes; see <tt>char-bits-limit</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=1016>&#160;</A>
to replace the notion of bits and font attributes with
that of implementation-defined attributes.
<br><img align=bottom alt="change_end" src="gif/change_end.gif">
<P>
<BR> <HR><A NAME=tex2html1820 HREF="node26.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html1818 HREF="node21.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html1812 HREF="node24.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html1822 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html1823 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html1821 HREF="node26.html"> String Characters</A>
<B>Up:</B> <A NAME=tex2html1819 HREF="node21.html"> Characters</A>
<B> Previous:</B> <A NAME=tex2html1813 HREF="node24.html"> Non-standard Characters</A>
<HR> <P>
<HR>
<P><ADDRESS>
AI.Repository@cs.cmu.edu
</ADDRESS>
</BODY>