# Z

`*Zap`
  A global variable holding a list and a pathname. If given, and the value of `*Solo` is `NIL`, 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 next `commit`. A (typically periodic) call to `zap_` will clean them up later.

      : (setq *Zap '(NIL . "db/app/_zap"))
      -> "db/app/_zap"

`(zap 'sym) -> sym`
  "Delete" the symbol `sym`. For internal symbols, that means to remove it from the internal index, effectively transforming it to a transient symbol. For external symbols, it means to mark it as "deleted", so that upon a later `commit` it will be removed from the database file. See also `intern`.

      : (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`, `chkTree` and `prune`.

      : (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 `0` in all `var` arguments. See also `one`, `on`, `off` and `onOff`.

      : (zero A B)
      -> 0
      : A
      -> 0
      : B
      -> 0