<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16414" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>Or better allow f to work for structs controlled by the current inspector
too:</DIV>
<DIV> </DIV>
<DIV>(define-struct structure1 (f1) (make-inspector))<BR>(define-struct
structure2 (f1 f2))<BR>(define x (make-structure1 1))<BR>(define y
(make-structure2 'a 'b))</DIV>
<DIV> </DIV>
<DIV>(define (f x)<BR> (parameterize ((print-struct #f))<BR> (printf
"Name of structure ~a~n"<BR> (regexp-replace* "^.*<struct:|>$"
(format "~s" x) ""))))</DIV>
<DIV> </DIV>
<DIV>(f x) ; displays Name of structure structure1<BR>(f y) ; displays Name of
structure structure2</DIV>
<DIV> </DIV>
<DIV>Jos Koot</DIV></BODY></HTML>