www.delorie.com/gnu/docs/elisp-manual-21/elisp_100.html   search  
 
Buy the book!


GNU Emacs Lisp Reference Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.2 Hash Table Access

This section describes the functions for accessing and storing associations in a hash table.

Function: gethash key table &optional default
This function looks up key in table, and returns its associated value---or default, if key has no association in table.

Function: puthash key value table
This function enters an association for key in table, with value value. If key already has an association in table, value replaces the old associated value.

Function: remhash key table
This function removes the association for key from table, if there is one. If key has no association, remhash does nothing.

Function: clrhash table
This function removes all the associations from hash table table, so that it becomes empty. This is also called clearing the hash table.

Function: maphash function table
This function calls function once for each of the associations in table. The function function should accept two arguments--a key listed in table, and its associated value.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003