Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.



type: defined function (closure)
location: extension
source file: init.lsp
Common LISP compatible: yes
supported on: all machines


(makunbound  <symbol> )
        <symbol>        -       an expression evaluating to a symbol


The MAKUNBOUND function makes a symbol's value unbound. The <symbol> must be a valid symbol, but it does not need to have a value. The MAKUNBOUND function returns the symbol as its result.


(makunbound 'florp)                     ; returns FLORP
(setq myvar "hi")                       ; setup MYVAR "hi"
myvar                                   ; returns "hi"
(makunbound 'myvar)                     ; returns MYVAR
myvar                                   ; error: unbound variable

NOTE: MAKUNBOUND is not misspelled - there is no 'e' in it.

NOTE: The FMAKUNBOUND works on functions (closures) in the same way that MAKUNBOUND works on variables. Be sure to use the correct one for what you are unbinding. These functions do not generate an error if you try to unbind the wrong type. This is because of the definition of these functions and the fact that the function and variable name spaces are separate. You can have both a function called FOO and a variable called FOO.

NOTE: The function MAKUNBOUND is created in the INIT.LSP file. If it does not exist in your XLISP system, you might be having a problem with INIT.LSP. Before you start XLISP, look in the directory you are currently in, and check to see if there is an INIT.LSP.

Go to the first, previous, next, last section, table of contents.