Skip to content
Snippets Groups Projects
Commit 171421d3 authored by rtoy's avatar rtoy
Browse files

Add DESCRIBE-CHARACTER function to describe characters. This includes

the character's code and name.
parent 2b772630
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/describe.lisp,v 1.50 2009/06/11 16:03:57 rtoy Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/describe.lisp,v 1.51 2009/06/15 17:58:06 rtoy Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -111,6 +111,7 @@
(instance (describe-instance x))
(array (describe-array x))
(fixnum (describe-fixnum x))
(character (describe-character x))
#+double-double
(double-double-float (describe-double-double-float x))
(cons
......@@ -138,6 +139,11 @@
(defun default-describe (x)
(format t "~&~S is a ~S." x (type-of x)))
(defun describe-character (x)
(format t "~&~S is a ~S." x (type-of x))
(format t "~&Its code is #x~4,'0x." (char-code x))
(format t "~&Its name is ~A." (char-name x)))
(defun describe-instance (x &optional (kind :structure))
(cond ((let ((so-class (kernel::find-class 'standard-object nil)))
(and so-class (typep x so-class)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment