% Standard-Generic-Function DOCUMENTATION
documentation x doc-type => documentation
( setf documentation ) new-value x doc-type => new-value
doc-type, object
documentation ( x function )
( doc-type ( eql ' t ) )
documentation ( x function )
( doc-type ( eql ' function ) )
documentation ( x list )
( doc-type ( eql ' function ) )
documentation ( x list )
( doc-type ( eql ' compiler-macro ) )
documentation ( x symbol )
( doc-type ( eql ' function ) )
documentation ( x symbol )
( doc-type ( eql ' compiler-macro ) )
documentation ( x symbol )
( doc-type ( eql ' setf ) )
( setf documentation ) new-value ( x function )
( doc-type ( eql ' t ) )
( setf documentation ) new-value ( x function )
( doc-type ( eql ' function ) )
( setf documentation ) new-value ( x list )
( doc-type ( eql ' function ) )
( setf documentation ) new-value ( x list )
( doc-type ( eql ' compiler-macro ) )
( setf documentation ) new-value ( x symbol )
( doc-type ( eql ' function ) )
( setf documentation ) new-value ( x symbol )
( doc-type ( eql ' compiler-macro ) )
( setf documentation ) new-value ( x symbol )
( doc-type ( eql ' setf ) )
method-combination:documentation ( x method-combination )
( doc-type ( eql ' t ) )
documentation ( x method-combination )
( doc-type ( eql ' method-combination ) )
documentation ( x symbol )
( doc-type ( eql ' method-combination ) )
( setf documentation ) new-value ( x method-combination )
( doc-type ( eql ' t ) )
( setf documentation ) new-value ( x method-combination )
( doc-type ( eql ' method-combination ) )
( setf documentation ) new-value ( x symbol )
( doc-type ( eql ' method-combination ) )
documentation ( x standard-method )
( doc-type ( eql ' t ) )
( setf documentation ) new-value ( x standard-method )
( doc-type ( eql ' t ) )
documentation ( x package )
( doc-type ( eql ' t ) )
( setf documentation ) new-value ( x package )
( doc-type ( eql ' t ) )
documentation ( x standard-class )
( doc-type ( eql ' t ) )
documentation ( x standard-class )
( doc-type ( eql ' type ) )
documentation ( x structure-class )
( doc-type ( eql ' t ) )
documentation ( x structure-class )
( doc-type ( eql ' type ) )
documentation ( x symbol )
( doc-type ( eql ' type ) )
documentation ( x symbol )
( doc-type ( eql ' structure ) )
( setf documentation ) new-value ( x standard-class )
( doc-type ( eql ' t ) )
( setf documentation ) new-value ( x standard-class )
( doc-type ( eql ' type ) )
( setf documentation ) new-value ( x structure-class )
( doc-type ( eql ' t ) )
( setf documentation ) new-value ( x structure-class )
( doc-type ( eql ' type ) )
( setf documentation ) new-value ( x symbol )
( doc-type ( eql ' type ) )
( setf documentation ) new-value ( x symbol )
( doc-type ( eql ' structure ) )
documentation ( x symbol )
( doc-type ( eql ' variable ) )
( setf documentation ) new-value ( x symbol )
( doc-type ( eql ' variable ) )
x - オブジェクト
doc-type - シンボル
documentation - 文字列か、nil
new-value - 文字列
ジェネリック関数documentationは、
もし引数のオブジェクトに関連付けられたものが利用可能なとき、
そのドキュメント文字列を返却します。
そうではないときは、nilを返却します。
ジェネリック関数(setf documentation)は、
xに関連付けられたドキュメント文字列をnew-valueに更新します。
もしxがリストのとき、それは(setf symbol)のフォームでなければなりません。
ドキュメント文字列はデバッグ目的で利用できます。 適合するプログラムは、ドキュメント文字列が存在するときは それを使うことが許されていますが、 それらドキュメント文字列の存在が正しく返却されるような動作に 依存してはいけません。 実装はどんな時でも、実装定義の理由で ドキュメント文字列を切り捨てることが許されます。
返却されるドキュメント文字列の性質は、 doc-typeにより下記に示すようなものに依存します。
compiler-macro
function
method-combination
method-combinationの
ドキュメント文字列を返却します。method-combinationのとき、
xに関連づいたドキュメント文字列を返却します。setf
structure
t
type
structure-classかstandard-classのインスタンスのとき、
クラスxに関連づいたドキュメント文字列を返却します。variable
適合する実装か、適合するプログラムは、 doc-typeとして許容可能なシンボルの集合を拡張するかもしれません。
なし。
なし。
なし。
なし。
標準では、ドキュメント文字列は
defclassフォームによって指定された個別スロットから
取得するという意味で定めているのではありません。
しかし実装はこの情報を処理するような
デバッグツールやプログラミング言語の拡張を提供するかもしれません。
このようなサポートの提供を行いたいような実装者は、
どのようにしてそれを行うかについての方法を得るために、
Metaobject Protocolを調査することをお勧めします。