BANNER
PrevChapter 2 

Debugging

my-debug

(my-debug return-value)

A version of debug that tries to print more helpful information than <unknown object .... Will need extending for any further types added to Jade which don't have useful print methods.

;; A version of debug that tries to print more helpful information
;; than `<unknown object ...'.  Will need extending for any further
;; types added to Jade which don't have useful print methods.  Fixme:
;; should yield more information extracted from each type.
(define (my-debug x #!optional return-value)
  (debug (cond ((node-list? x)
                (if (node-list-empty? x)
                    (list 'empty-node-list x)
                    (list (if (named-node-list? x)
                              'named-node-list
                              'node-list)
                          (node-list-length x) x)))
               ((sosofo? x)
                (list 'sosofo x))
               ((procedure? x)
                (list 'procedure x))
               ((style? x)
                (list 'style x))
               ((address? x)
                (list 'address x))
               ((color? x)
                (list 'color x))
               ((color-space? x)
                (list 'color-space x))
               ((display-space? x)
                (list 'display-space x))
               ((inline-space? x)
                (list 'inline-space x))
               ((glyph-id? x)
                (list 'glyph-id x))
               ((glyph-subst-table? x)
                (list 'glyph-subst-table x))
               (else x))))

PrevHome 
ProcedureUp