38 lines
5.7 KiB
HTML
38 lines
5.7 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.3.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="02_ce.htm">
|
|
<LINK REL=UP HREF="02_c.htm">
|
|
<LINK REL=NEXT HREF="02_d.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_ce.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="02_c.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="02_d.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
|
|
|
|
<HR>
|
|
|
|
<H2>
|
|
2.3.6 Package System Consistency Rules</H2> <P>
|
|
The following rules apply to the package system as long as the <A REL=DEFINITION HREF="26_glo_v.htm#value"><I>value</I></A> of <A REL=DEFINITION HREF="v_pkg.htm#STpackageST"><B>*package*</B></A> is not changed: <P>
|
|
<P><DL><DT><B>Read-read consistency</B> <P><DD>
|
|
Reading the same <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbol</I></A> <A REL=DEFINITION HREF="26_glo_n.htm#name"><I>name</I></A> always results in the <A REL=DEFINITION HREF="26_glo_s.htm#same"><I>same</I></A> <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbol</I></A>. <P>
|
|
<DT><B>Print-read consistency</B> <P><DD>
|
|
An <A REL=DEFINITION HREF="26_glo_i.htm#interned"><I>interned</I></A> <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbol</I></A> always prints as a sequence of characters that, when read back in, yields the <A REL=DEFINITION HREF="26_glo_s.htm#same"><I>same</I></A> <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbol</I></A>. <P>
|
|
For information about how the <A REL=DEFINITION HREF="26_glo_l.htm#lisp_printer"><I>Lisp printer</I></A> treats <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbols</I></A>, see <A REL=CHILD HREF="22_acc.htm">Section 22.1.3.3 (Printing Symbols)</A>. <P>
|
|
<DT><B>Print-print consistency</B> <P><DD>
|
|
If two interned <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbols</I></A> are not the <A REL=DEFINITION HREF="26_glo_s.htm#same"><I>same</I></A>, then their printed representations will be different sequences of characters. <P></DL><P>
|
|
These rules are true regardless of any implicit interning. As long as the <A REL=DEFINITION HREF="26_glo_c.htm#current_package"><I>current package</I></A> is not changed, results are reproducible regardless of the order of <I>loading</I> files or the exact history of what <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbols</I></A> were typed in when. If the <A REL=DEFINITION HREF="26_glo_v.htm#value"><I>value</I></A> of <A REL=DEFINITION HREF="v_pkg.htm#STpackageST"><B>*package*</B></A> is changed and then changed back to the previous value, consistency is maintained. The rules can be violated by changing the <A REL=DEFINITION HREF="26_glo_v.htm#value"><I>value</I></A> of <A REL=DEFINITION HREF="v_pkg.htm#STpackageST"><B>*package*</B></A>, forcing a change to <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbols</I></A> or to <A REL=DEFINITION HREF="26_glo_p.htm#package"><I>packages</I></A> or to both by continuing from an error, or calling one of the following <A REL=DEFINITION HREF="26_glo_f.htm#function"><I>functions</I></A>: <A REL=DEFINITION HREF="f_uninte.htm#unintern"><B>unintern</B></A>, <A REL=DEFINITION HREF="f_unexpo.htm#unexport"><B>unexport</B></A>, <A REL=DEFINITION HREF="f_shadow.htm#shadow"><B>shadow</B></A>, <A REL=DEFINITION HREF="f_shdw_i.htm#shadowing-import"><B>shadowing-import</B></A>, or <A REL=DEFINITION HREF="f_unuse_.htm#unuse-package"><B>unuse-package</B></A>. <P>
|
|
An inconsistency only applies if one of the restrictions is violated between two of the named <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbols</I></A>. <A REL=DEFINITION HREF="f_shadow.htm#shadow"><B>shadow</B></A>, <A REL=DEFINITION HREF="f_unexpo.htm#unexport"><B>unexport</B></A>, <A REL=DEFINITION HREF="f_uninte.htm#unintern"><B>unintern</B></A>, and <A REL=DEFINITION HREF="f_shdw_i.htm#shadowing-import"><B>shadowing-import</B></A> can only affect the consistency of <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbols</I></A> with the same <A REL=DEFINITION HREF="26_glo_n.htm#name"><I>names</I></A> (under <A REL=DEFINITION HREF="f_stgeq_.htm#stringEQ"><B>string=</B></A>) as the ones supplied as arguments. <P>
|
|
<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>
|