1
0
Fork 0
cl-sites/HyperSpec-7-0/HyperSpec/Body/03_f.htm
2024-04-01 10:24:07 +02:00

38 lines
4.6 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 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="03_eah.htm">
<LINK REL=UP HREF="03_.htm">
<LINK REL=NEXT HREF="03_g.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="03_eah.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="03_.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="03_g.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
<HR>
<H2>
3.6 Traversal Rules and Side Effects</H2> <P>
<P>
The consequences are undefined when <A REL=DEFINITION HREF="26_glo_c.htm#code"><I>code</I></A> executed during an <A REL=DEFINITION HREF="26_glo_o.htm#object-traversing"><I>object-traversing</I></A> operation destructively modifies the <A REL=DEFINITION HREF="26_glo_o.htm#object"><I>object</I></A> in a way that might affect the ongoing traversal operation. In particular, the following rules apply. <P><DL><DT><B>List traversal</B> <P><DD>
For <A REL=DEFINITION HREF="26_glo_l.htm#list"><I>list</I></A> traversal operations, the <A REL=DEFINITION HREF="26_glo_c.htm#cdr"><I>cdr</I></A> chain of the <A REL=DEFINITION HREF="26_glo_l.htm#list"><I>list</I></A> is not allowed to be destructively modified. <P>
<DT><B>Array traversal</B> <P><DD>
For <A REL=DEFINITION HREF="26_glo_a.htm#array"><I>array</I></A> traversal operations, the <A REL=DEFINITION HREF="26_glo_a.htm#array"><I>array</I></A> is not allowed to be adjusted and its <A REL=DEFINITION HREF="26_glo_f.htm#fill_pointer"><I>fill pointer</I></A>, if any, is not allowed to be changed. <P>
<DT><B>Hash-table traversal</B> <P><DD>
For <A REL=DEFINITION HREF="26_glo_h.htm#hash_table"><I>hash table</I></A> traversal operations, new elements may not be added or deleted except that the element corresponding to the current hash key may be changed or removed. <P>
<DT><B>Package traversal</B> <P><DD>
For <A REL=DEFINITION HREF="26_glo_p.htm#package"><I>package</I></A> traversal operations (e.g., <A REL=DEFINITION HREF="m_do_sym.htm#do-symbols"><B>do-symbols</B></A>), new <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbols</I></A> may not be <A REL=DEFINITION HREF="26_glo_i.htm#interned"><I>interned</I></A> in or <A REL=DEFINITION HREF="26_glo_u.htm#uninterned"><I>uninterned</I></A> from the <A REL=DEFINITION HREF="26_glo_p.htm#package"><I>package</I></A> being traversed or any <A REL=DEFINITION HREF="26_glo_p.htm#package"><I>package</I></A> that it uses except that the current <A REL=DEFINITION HREF="26_glo_s.htm#symbol"><I>symbol</I></A> may be <A REL=DEFINITION HREF="26_glo_u.htm#uninterned"><I>uninterned</I></A> from the <A REL=DEFINITION HREF="26_glo_p.htm#package"><I>package</I></A> being traversed. <P>
<P></DL><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/iss240.htm">MAPPING-DESTRUCTIVE-INTERACTION:EXPLICITLY-VAGUE</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>