--
ricky
rgi...@surfsouth.com
My suggestion: Use the inspector. Why do you need to print all of it?
#:Erik
--
If this is not what you expected, please alter your expectations.
> Is there a lisp function that will print the actual contents of a
> hash-table out for debugging.
> (I'm using ACL)
>
(loop for key being each hash-key of *a-hash-table*
using (hash-value value)
collect (list key value))
will return the key value pairs in a list.
You can also use MAPHASH or WITH-HASH-TABLE-ITERATOR.
--
Lieven Marchand <m...@bewoner.dma.be>
If there are aliens, they play Go. -- Lasker
> Is there a lisp function that will print the actual contents of a
> hash-table out for debugging.
> (I'm using ACL)
maphash and with-hash-table-iterator allow you to iterate over the
contents of a hash-table.
Chris.
--
http://www.double.co.nz/dylan
(defun print-ht (ht &aux (*print-pretty* t))
(format t "~&~s~%" ht)
(maphash (lambda (k v) (format t "~@<~S~20T~3I~_~S~:>~%" k v)) ht)
(values))
(setf (tpl:alias "pht") #'print-ht)
Just kidding, #:Erik...
clocc/src/cllib/miscprint.lisp
(http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/~checkout~/clocc/src/clli
b/miscprint.lisp?cvsroot=clocc)
defun print-hash-table
see also clocc/src/cllib/inspect.lisp
which will display the hashtable in your html browser
> (I'm using ACL)
Allegro comes with an inspect ANSI CL function.
try it!
Sent via Deja.com http://www.deja.com/
Before you buy.