This shows you the differences between two versions of the page.
cl:functions:clrhash [2019/09/14 05:00] |
cl:functions:clrhash [2021/01/26 03:00] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Function CLRHASH ====== | ||
+ | |||
+ | ====Syntax==== | ||
+ | * **clrhash** //hash-table// → //hash-table// | ||
+ | |||
+ | ====Arguments and Values==== | ||
+ | * //hash-table// - a //[[CL:Glossary:hash table]]//. | ||
+ | |||
+ | ====Description==== | ||
+ | Removes all entries from //hash-table//, and then returns that empty //[[CL:Glossary:hash table]]//. | ||
+ | |||
+ | ====Examples==== | ||
+ | <blockquote> | ||
+ | ([[CL:Macros:defparameter]] *table* ([[CL:Functions:make-hash-table]])) <r>*TABLE*</r> | ||
+ | *table* <r>#<HASH-TABLE [[CL:Functions:EQL]] 0/120 32004073> </r> | ||
+ | ([[CL:Macros:dotimes]] (i 100) | ||
+ | ([[CL:Macros:setf]] ([[CL:Functions:gethash]] i *table*) ([[CL:Functions:format]] [[CL:Constant Variables:nil]] "~R" i))) <r>[[CL:Constant Variables:nil|NIL]] </r> | ||
+ | ([[CL:Functions:hash-table-count]] *table*) <r>100 </r> | ||
+ | ([[CL:Functions:gethash]] 57 *table*) <r>"fifty-seven", //[[CL:Glossary:true]]//</r> | ||
+ | (clrhash *table*) <r>#<HASH-TABLE [[CL:Functions:EQL]] 0/120 32004073> </r> | ||
+ | ([[CL:Functions:hash-table-count]] *table*) <r>0 </r> | ||
+ | ([[CL:Functions:gethash]] 57 *table*) <r>[[CL:Constant Variables:nil|NIL]], //[[CL:Glossary:false]]//</r> | ||
+ | </blockquote> | ||
+ | |||
+ | ====Side Effects==== | ||
+ | The //hash-table// is modified. | ||
+ | |||
+ | ====Affected By==== | ||
+ | None. | ||
+ | |||
+ | ====Exceptional Situations==== | ||
+ | None. | ||
+ | |||
+ | ====See Also==== | ||
+ | None. | ||
+ | |||
+ | ====Notes==== | ||
+ | None. | ||