《通链参考手册》


Function FBOUNDP

●语法设定:

fboundp name => generalized-boolean

●发音:

[,ef'bandpee]

●参数和值:

name---a function name.

generalized-boolean---a generalized boolean.

●详情:

Returns true if name is fbound; otherwise, returns false.

●例子:

 (fboundp 'car) =>  true
 (fboundp 'nth-value) =>  false
 (fboundp 'with-open-file) =>  true
 (fboundp 'unwind-protect) =>  true
 (defun my-function (x) x) =>  MY-FUNCTION
 (fboundp 'my-function) =>  true
 (let ((saved-definition (symbol-function 'my-function)))
   (unwind-protect (progn (fmakunbound 'my-function)
                          (fboundp 'my-function))
     (setf (symbol-function 'my-function) saved-definition)))
=>  false
 (fboundp 'my-function) =>  true
 (defmacro my-macro (x) `',x) =>  MY-MACRO
 (fboundp 'my-macro) =>  true
 (fmakunbound 'my-function) =>  MY-FUNCTION
 (fboundp 'my-function) =>  false
 (flet ((my-function (x) x))
   (fboundp 'my-function)) =>  false

●副作用: None.

●受制于: 无。

●例外情况:

Should signal an error of type type-error if name is not a function name.

●更多信息:

symbol-function, fmakunbound, fdefinition

●说明:

It is permissible to call symbol-function on any symbol that is fbound.

fboundp is sometimes used to ``guard'' an access to the function cell, as in:

(if (fboundp x) (symbol-function x))

Defining a setf expander F does not cause the setf function (setf F) to become defined.


X3J13设计清单非标准部分,可查下面章节:


◇首页 § ◎章节目录 § □内容索引 § ○符号索引 § △术语表 § ※设计草案