refZ.html (3212B)
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd"> 2 <html lang="en"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 5 <title>Z</title> 6 <link rel="stylesheet" href="doc.css" type="text/css"> 7 </head> 8 <body> 9 10 <h1>Z</h1> 11 12 <dl> 13 14 <dt><a name="*Zap"><code>*Zap</code></a> 15 <dd>A global variable holding a list and a pathname. If given, and the value of 16 <code><a href="refS.html#*Solo">*Solo</a></code> is <code>NIL</code>, external 17 symbols which are no longer accessible can be collected in the CAR, e.g. during 18 DB tree processing, and written to the file in the CDR at the next <code><a 19 href="refC.html#commit">commit</a></code>. A (typically periodic) call to 20 <code><a href="refZ.html#zap_">zap_</a></code> will clean them up later. 21 22 <pre><code> 23 : (setq *Zap '(NIL . "db/app/_zap")) 24 -> "db/app/_zap" 25 </code></pre> 26 27 <dt><a name="zap"><code>(zap 'sym) -> sym</code></a> 28 <dd>"Delete" the symbol <code>sym</code>. For internal symbols, that means to 29 remove it from the internal index, effectively transforming it to a transient 30 symbol. For external symbols, it means to mark it as "deleted", so that upon a 31 later <code><a href="refC.html#commit">commit</a></code> it will be removed from 32 the database file. See also <code><a href="refI.html#intern">intern</a></code>. 33 34 <pre><code> 35 : (de foo (Lst) (car Lst)) # 'foo' calls 'car' 36 -> foo 37 : (zap 'car) # Delete the symbol 'car' 38 -> "car" 39 : (pp 'foo) 40 (de foo (Lst) 41 ("car" Lst) ) # 'car' is now a transient symbol 42 -> foo 43 : (foo (1 2 3)) # 'foo' still works 44 -> 1 45 : (car (1 2 3)) # Reader returns a new 'car' symbol 46 !? (car (1 2 3)) 47 car -- Undefined 48 ? 49 </code></pre> 50 51 <dt><a name="zapTree"><code>(zapTree 'sym)</code></a> 52 <dd>Recursively deletes a tree structure from the database. See also <code><a 53 href="refT.html#tree">tree</a></code>, <code><a 54 href="refC.html#chkTree">chkTree</a></code> and <code><a 55 href="refP.html#prune">prune</a></code>. 56 57 <pre><code> 58 : (zapTree (cdr (root (tree 'nm '+Item)))) 59 </code></pre> 60 61 <dt><a name="zap_"><code>(zap_)</code></a> 62 <dd>Delayed deletion (with <code><a href="refZ.html#zap">zap</a></code>) of 63 external symbols which were collected e.g. during DB tree processing. An 64 auxiliary file (with the name taken from the CDR of the value of <code><a 65 href="refZ.html#*Zap">*Zap</a></code>, concatenated with a "<code>_</code>" 66 character) is used as an intermediary file. 67 68 <pre><code> 69 : *Zap 70 -> (NIL . "db/app/Z") 71 : (call 'ls "-l" "db/app") 72 ... 73 -rw-r--r-- 1 abu abu 1536 2007-06-23 12:34 Z 74 -rw-r--r-- 1 abu abu 1280 2007-05-23 12:15 Z_ 75 ... 76 : (zap_) 77 ... 78 : (call 'ls "-l" "db/app") 79 ... 80 -rw-r--r-- 1 abu abu 1536 2007-06-23 12:34 Z_ 81 ... 82 </code></pre> 83 84 <dt><a name="zero"><code>(zero var ..) -> 0</code></a> 85 <dd>Stores <code>0</code> in all <code>var</code> arguments. See also <code><a 86 href="refO.html#one">one</a></code>, <code><a href="refO.html#on">on</a></code>, 87 <code><a href="refO.html#off">off</a></code> and <code><a 88 href="refO.html#onOff">onOff</a></code>. 89 90 <pre><code> 91 : (zero A B) 92 -> 0 93 : A 94 -> 0 95 : B 96 -> 0 97 </code></pre> 98 99 </dl> 100 101 </body> 102 </html>