XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next

nil


Type:   -   system constant
Source:   -   xlsym.c

Syntax

 nil

Description

The 'nil' constant represents the empty list or the false value, as oppossed to the true value [the symbol  T ]. 'nil' can be written as the three character symbol 'nil' or as the empty list ().

Examples

(setq myvar nil)                     ; set MYVAR to False
(setq myvar 'nil)                    ; NIL and 'NIL evaluate to NIL
(setq myvar ())                      ; () is the empty list = NIL
(setq myvar '())                     ; () and '() evaluate to NIL
(if nil (print "this won't print")   ; if/then/else
        (print "this will print"))

Note: You can not change the value of NIL.

  Back to Top


XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next