139 lines
9.2 KiB
HTML
139 lines
9.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 2.4.8</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="02_dg.htm">
|
||
|
<LINK REL=UP HREF="02_d.htm">
|
||
|
<LINK REL=NEXT HREF="02_dha.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="02_dg.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="02_d.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="02_dha.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
|
||
|
|
||
|
<HR>
|
||
|
|
||
|
<H2>
|
||
|
2.4.8 Sharpsign</H2> <P>
|
||
|
<A REL=DEFINITION HREF="26_glo_s.htm#sharpsign"><I>Sharpsign</I></A> is a <A REL=DEFINITION HREF="26_glo_n.htm#non-terminating"><I>non-terminating</I></A> <A REL=DEFINITION HREF="26_glo_d.htm#dispatching_macro_character"><I>dispatching macro character</I></A>. It reads an optional sequence of digits and then one more character, and uses that character to select a <A REL=DEFINITION HREF="26_glo_f.htm#function"><I>function</I></A> to run as a <A REL=DEFINITION HREF="26_glo_r.htm#reader_macro_function"><I>reader macro function</I></A>. <P>
|
||
|
The <A REL=DEFINITION HREF="26_glo_s.htm#standard_syntax"><I>standard syntax</I></A> includes constructs introduced by the <TT>#</TT> character. The syntax of these constructs is as follows: a character that identifies the type of construct is followed by arguments in some form. If the character is a letter, its <A REL=DEFINITION HREF="26_glo_c.htm#case"><I>case</I></A> is not important; <TT>#O</TT> and <TT>#o</TT> are considered to be equivalent, for example. <P>
|
||
|
Certain <TT>#</TT> constructs allow an unsigned decimal number to appear between the <TT>#</TT> and the character. <P>
|
||
|
The <A REL=DEFINITION HREF="26_glo_r.htm#reader_macro"><I>reader macros</I></A> associated with the <A REL=DEFINITION HREF="26_glo_d.htm#dispatching_macro_character"><I>dispatching macro character</I></A> <TT>#</TT> are described later in this section and summarized in the next figure. <P>
|
||
|
<PRE>
|
||
|
dispatch char purpose dispatch char purpose
|
||
|
Backspace signals error { undefined*
|
||
|
Tab signals error } undefined*
|
||
|
Newline signals error + read-time conditional
|
||
|
Linefeed signals error - read-time conditional
|
||
|
Page signals error . read-time evaluation
|
||
|
Return signals error / undefined
|
||
|
Space signals error A, a array
|
||
|
! undefined* B, b binary rational
|
||
|
" undefined C, c complex number
|
||
|
# reference to = label D, d undefined
|
||
|
$ undefined E, e undefined
|
||
|
% undefined F, f undefined
|
||
|
& undefined G, g undefined
|
||
|
' function abbreviation H, h undefined
|
||
|
( simple vector I, i undefined
|
||
|
) signals error J, j undefined
|
||
|
* bit vector K, k undefined
|
||
|
, undefined L, l undefined
|
||
|
: uninterned symbol M, m undefined
|
||
|
; undefined N, n undefined
|
||
|
< signals error O, o octal rational
|
||
|
= labels following object P, p pathname
|
||
|
> undefined Q, q undefined
|
||
|
? undefined* R, r radix-n rational
|
||
|
@ undefined S, s structure
|
||
|
[ undefined* T, t undefined
|
||
|
\ character object U, u undefined
|
||
|
] undefined* V, v undefined
|
||
|
^ undefined W, w undefined
|
||
|
_ undefined X, x hexadecimal rational
|
||
|
` undefined Y, y undefined
|
||
|
| balanced comment Z, z undefined
|
||
|
~ undefined Rubout undefined
|
||
|
</PRE>
|
||
|
<P><B>Figure 2-19. Standard #Dispatching Macro Character Syntax</B> <P>
|
||
|
The combinations marked by an asterisk (*) are explicitly reserved to the user. No <A REL=DEFINITION HREF="26_glo_c.htm#conforming_implementation"><I>conforming implementation</I></A> defines them. <P>
|
||
|
Note also that <A REL=DEFINITION HREF="26_glo_d.htm#digit"><I>digits</I></A> do not appear in the preceding table. This is because the notations <TT>#0</TT>, <TT>#1</TT>, ..., <TT>#9</TT> are reserved for another purpose which occupies the same syntactic space. When a <A REL=DEFINITION HREF="26_glo_d.htm#digit"><I>digit</I></A> follows a <A REL=DEFINITION HREF="26_glo_s.htm#sharpsign"><I>sharpsign</I></A>, it is not treated as a dispatch character. Instead, an unsigned integer argument is accumulated and passed as an <A REL=DEFINITION HREF="26_glo_a.htm#argument"><I>argument</I></A> to the <A REL=DEFINITION HREF="26_glo_r.htm#reader_macro"><I>reader macro</I></A> for the <A REL=DEFINITION HREF="26_glo_c.htm#character"><I>character</I></A> that follows the digits. For example, <TT>#2A((1 2) (3 4))</TT> is a use of <TT>#A</TT> with an argument of <TT>2</TT>. <P>
|
||
|
|
||
|
|
||
|
<A REL=CHILD HREF="02_dha.htm"><H2>
|
||
|
2.4.8.1 Sharpsign Backslash</H2></A><P>
|
||
|
|
||
|
<A REL=CHILD HREF="02_dhb.htm"><H2>
|
||
|
2.4.8.2 Sharpsign Single-Quote</H2></A><P>
|
||
|
|
||
|
<A REL=CHILD HREF="02_dhc.htm"><H2>
|
||
|
2.4.8.3 Sharpsign Left-Parenthesis</H2></A><P>
|
||
|
|
||
|
<A REL=CHILD HREF="02_dhd.htm"><H2>
|
||
|
2.4.8.4 Sharpsign Asterisk</H2></A><P>
|
||
|
|
||
|
<A REL=CHILD HREF="02_dhe.htm"><H2>
|
||
|
2.4.8.5 Sharpsign Colon</H2></A><P>
|
||
|
|
||
|
<A REL=CHILD HREF="02_dhf.htm"><H2>
|
||
|
2.4.8.6 Sharpsign Dot</H2></A><P> <P>
|
||
|
|
||
|
|
||
|
<A REL=CHILD HREF="02_dhg.htm"><H2>
|
||
|
2.4.8.7 Sharpsign B</H2></A><P>
|
||
|
|
||
|
<A REL=CHILD HREF="02_dhh.htm"><H2>
|
||
|
2.4.8.8 Sharpsign O</H2></A><P>
|
||
|
|
||
|
<A REL=CHILD HREF="02_dhi.htm"><H2>
|
||
|
2.4.8.9 Sharpsign X</H2></A><P>
|
||
|
|
||
|
<A REL=CHILD HREF="02_dhj.htm"><H2>
|
||
|
2.4.8.10 Sharpsign R</H2></A><P>
|
||
|
|
||
|
<A REL=CHILD HREF="02_dhk.htm"><H2>
|
||
|
2.4.8.11 Sharpsign C</H2></A><P>
|
||
|
|
||
|
<A REL=CHILD HREF="02_dhl.htm"><H2>
|
||
|
2.4.8.12 Sharpsign A</H2></A><P>
|
||
|
|
||
|
<A REL=CHILD HREF="02_dhm.htm"><H2>
|
||
|
2.4.8.13 Sharpsign S</H2></A><P>
|
||
|
|
||
|
<A REL=CHILD HREF="02_dhn.htm"><H2>
|
||
|
2.4.8.14 Sharpsign P</H2></A><P>
|
||
|
|
||
|
<A REL=CHILD HREF="02_dho.htm"><H2>
|
||
|
2.4.8.15 Sharpsign Equal-Sign</H2></A><P>
|
||
|
|
||
|
<A REL=CHILD HREF="02_dhp.htm"><H2>
|
||
|
2.4.8.16 Sharpsign Sharpsign</H2></A><P>
|
||
|
|
||
|
<A REL=CHILD HREF="02_dhq.htm"><H2>
|
||
|
2.4.8.17 Sharpsign Plus</H2></A><P>
|
||
|
|
||
|
<A REL=CHILD HREF="02_dhr.htm"><H2>
|
||
|
2.4.8.18 Sharpsign Minus</H2></A><P>
|
||
|
|
||
|
<A REL=CHILD HREF="02_dhs.htm"><H2>
|
||
|
2.4.8.19 Sharpsign Vertical-Bar</H2></A><P>
|
||
|
|
||
|
<A REL=CHILD HREF="02_dht.htm"><H2>
|
||
|
2.4.8.20 Sharpsign Less-Than-Sign</H2></A><P>
|
||
|
|
||
|
<A REL=CHILD HREF="02_dhu.htm"><H2>
|
||
|
2.4.8.21 Sharpsign Whitespace</H2></A><P>
|
||
|
|
||
|
<A REL=CHILD HREF="02_dhv.htm"><H2>
|
||
|
2.4.8.22 Sharpsign Right-Parenthesis</H2></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/iss315.htm">SHARP-COMMA-CONFUSION:REMOVE</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>
|