- *Zap
- A global variable holding a list and a pathname. If given, and the value of
*SoloisNIL, external
symbols which are no longer accessible can be collected in the CAR, e.g. during
DB tree processing, and written to the file in the CDR at the nextcommit. A (typically periodic) call tozap_will clean them up later.
: (setq *Zap '(NIL . "db/app/_zap"))
-> (NIL . "db/app/_zap")
 
- (zap 'sym) -> sym
- "Delete" the symbol sym. For internal symbols, that means to
remove it from the current namespace, effectively transforming it to a transient
symbol. For external symbols, it means to mark it as "deleted", so that upon a
latercommitit will be removed from
the database file. See alsointern.
: (de foo (Lst) (car Lst))          # 'foo' calls 'car'
-> foo
: (zap 'car)                        # Delete the symbol 'car'
-> "car"
: (pp 'foo)
(de foo (Lst)
   ("car" Lst) )                    # 'car' is now a transient symbol
-> foo
: (foo (1 2 3))                     # 'foo' still works
-> 1
: (car (1 2 3))                     # Reader returns a new 'car' symbol
!? (car (1 2 3))
car -- Undefined
?
- (zapTree 'sym)
- Recursively deletes a tree structure from the database. See also tree,chkTreeandprune.
: (zapTree (cdr (root (tree 'nm '+Item))))
 
- (zap_)
- Delayed deletion (with zap) of
external symbols which were collected e.g. during DB tree processing. An
auxiliary file (with the name taken from the CDR of the value of*Zap, concatenated with a "_"
character) is used as an intermediary file.
: *Zap
-> (NIL . "db/app/Z")
: (call 'ls "-l" "db/app")
...
-rw-r--r-- 1 abu abu     1536 2007-06-23 12:34 Z
-rw-r--r-- 1 abu abu     1280 2007-05-23 12:15 Z_
...
: (zap_)
...
: (call 'ls "-l" "db/app")
...
-rw-r--r-- 1 abu abu     1536 2007-06-23 12:34 Z_
...
 
- (zero var ..) -> 0
- Stores 0in allvararguments. See alsoone,on,offandonOff.
: (zero A B)
-> 0
: A
-> 0
: B
-> 0