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.

fboundp

fboundp

type: predicate function (subr)
location: built-in
source file: xlbfun.c
Common LISP compatible: yes
supported on: all machines

SYNTAX

(fboundp <symbol> )
        <symbol>        -       the symbol expression to check for a value

DESCRIPTION

The FBOUNDP predicate checks to see if <symbol> is a symbol with a function definition (closure) bound to it. T is returned if <symbol> has a function value, NIL is returned otherwise. Note that <symbol> is a symbol expression - it is evaluated and the resulting expression is the one that is checked.

EXAMPLES

(defun foo (x) (print x))               ; set up function FOO
(fboundp 'foo)                          ; returns T - value is closure
(fboundp 'defvar)                       ; returns T - value is closure
(fboundp 'car)                          ; returns T - value is closure

        (setq myvar 'goo)                       ; set up MYVAR to have value GOO
        (FBOUNDP myvar)                         ; returns NIL - because GOO has
                                                ;               no value yet
        (defmacro goo () (print "hi"))          ; define GOO macro
        (FBOUNDP myvar)                         ; returns T

        (fboundp 'a)                            ; returns NIL 
        (fboundp '1)                            ; error: bad argument type - 1
        (fboundp "hi")                          ; error: bad argument type - "hi"


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