<!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>(define-struct structure1 (f1))<BR>(define-struct structure2 (f1 
f2))<BR>(define x (make-structure1 1))<BR>(define y (make-structure2 'a 
'b))</DIV>
<DIV>&nbsp;</DIV>
<DIV>(define (f x)<BR>&nbsp;(printf "Name of&nbsp; structure ~a~n"<BR>&nbsp; 
(regexp-replace* ".*&lt;struct:|&gt;$" (format "~s" x) "")))</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>(((((lambda(x)((((((((x x)x)x)x)x)x)x)x))<BR>&nbsp;&nbsp;&nbsp; 
(lambda(x)(lambda(y)(x(x y)))))<BR>&nbsp;&nbsp; (lambda(x)(x)x))<BR>&nbsp; 
(lambda()(printf "Greetings, Jos~n"))))</DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=wwall@yandex.ru href="mailto:wwall@yandex.ru">wwall</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=plt-scheme@list.cs.brown.edu 
  href="mailto:plt-scheme@list.cs.brown.edu">plt-scheme</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, April 11, 2007 9:42 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [plt-scheme] How get name of 
  structure</DIV>
  <DIV><BR></DIV>Hello plt-scheme,<BR>i have this code:<BR><BR>(define-structure 
  structure1 (f1))<BR>(define-structure structure2 (f1 f2))<BR>(define x 
  (make-structure1 1))<BR>(define y (make-structure2 'a 'b))<BR><BR>(define (f 
  x)<BR>(display (format "Name of&nbsp; structure ~a \n" (??? x))))<BR><BR>;call 
  f<BR>(f x)<BR>(f y)<BR>want what will be printed<BR>"Name of&nbsp; structure 
  structure1"<BR>"Name of&nbsp; structure structure2"<BR><BR>what i must write 
  on place "???"<BR>now i write so<BR>(define (??? x) (string-&gt;symbol 
  (substring (symbol-&gt;string (vector-ref (struct-&gt;vector&nbsp;&nbsp; x) 0) 
  ) 12)) )<BR>but think what exists simply method<BR><BR><BR>Thanks<BR>-- 
  <BR>Best 
  regards,<BR>&nbsp;wwall&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  <A 
  href="mailto:wwall@yandex.ru">mailto:wwall@yandex.ru</A><BR><BR>_________________________________________________<BR>&nbsp; 
  For list-related administrative tasks:<BR>&nbsp; <A 
  href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme">http://list.cs.brown.edu/mailman/listinfo/plt-scheme</A><BR></BLOCKQUOTE></BODY></HTML>