[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(describe) of function
>CMU Common Lisp 16b, running on stetten
>Hemlock 3.5 (16b), Python 1.0(16b), target SPARCstation/Sun 4
>Send bug reports and questions to cmucl-bugs@cs.cmu.edu.
So shall I do.
I found the description that (describe ...) provides to be somewhat
inconsistent. Here is an example:
(defun sqr (x) "computes square of number X" (declare (number x)) (* x x))
This function is first defined at TOP-LEVEL, interactive mode.
Here is the information that (describe 'sqr) provides:
Interpreted function:
SQR is an internal symbol in the COMMON-LISP-USER package.
Function: #<Interpreted Function SQR {70AE0C9}>
Function arguments:
There are no arguments.
Function documentation:
computes square of number X
Its defined argument types are:
(NUMBER)
Its result type is:
*
Its definition is:
(LAMBDA (X) (DECLARE #) (BLOCK SQR #))
Note the "function arguments" field. The information seems erroneous
because it's not distinguishable from a function of no arguments. The
text is misleading.
Function compiled with (compile 'sqr):
SQR is an internal symbol in the COMMON-LISP-USER package.
Function: #<Function SQR {70D71F9}>
Function arguments:
(x)
Function documentation:
computes square of number X
On Tuesday, 4/7/92 05:10:51 pm [-1] it was compiled from:
#(#'(LAMBDA # # #))
Why are argument types and source lost?
Same function compiled from file test.lisp ((compile-file ...)):
SQR is an internal symbol in the COMMON-LISP-USER package.
Function: #<Function SQR {71C9DE9}>
Function arguments:
(x)
Function documentation:
computes square of number X
Its defined argument types are:
(NUMBER)
Its result type is:
NUMBER
On Tuesday, 4/7/92 05:26:03 pm [-1] it was compiled from:
[...]/hoehle/test.lisp
Created: Tuesday, 4/7/92 05:23:40 pm [-1]
This information is complete.
Joerg.
hoehle@lindau.inf-wiss.ivp.uni-konstanz.de