Newsgroups: comp.lang.lisp,comp.lang.clos
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!gatech!newsfeed.internetmci.com!news1.erols.com!news2.cais.net!news.cais.net!peer.news.xara.net!xara.net!uknet!newsfeed.ed.ac.uk!edcogsci!cnews
From: chrisbr@cogsci.ed.ac.uk (Chris Brew)
Subject: Re: CL: Transform result of print-unreadable-object into string or a  symbol?
In-Reply-To: dietz@lirmm.fr's message of 28 Mar 1996 20:33:43 +0100
X-Nntp-Posting-Host: blair
Message-ID: <f3tyboggt2q.fsf@blair.cogsci.ed.ac.uk>
Sender: chrisbr@blair.cogsci.ed.ac.uk
Organization: Centre for Cognitive Science, University of Edinburgh
References: <x5wx45t3l4.fsf@ticco.lirmm.fr>
Date: Mon, 1 Apr 1996 10:02:53 GMT
Lines: 32
Xref: glinda.oz.cs.cmu.edu comp.lang.lisp:21278 comp.lang.clos:3722

>>>>> In article <x5wx45t3l4.fsf@ticco.lirmm.fr>, dietz@lirmm.fr writes:
In article <x5wx45t3l4.fsf@ticco.lirmm.fr> dietz@lirmm.fr writes:


> Hello, printing a CLOS object results in something like that:

> #<#SET #345>

> This is the outcome of the function print-object (which calls
> print-unreadable-object).  Is it possible to make a string or a
> symbol out of such a representation?

(format nil <clos-object>) would produce "#<#SET #345>", which is
a string. If what you really want is to get a _meaningful_
string or symbol, then you have to tinker with methods
for print-object. There are also some PD routines
for saving and restoring objects in Mark Kantrowitz's
collection of utilities at CMU

Chris

-- 
------------------------------------------------------------------
Email: Chris.Brew@edinburgh.ac.uk
Address:  Language Technology Group, 
          HCRC, 2 Buccleuch Place,  Edinburgh EH8 9LW 
          Scotland
Telephone: +44 131 650 4631 
Fax:       +44 131 650 4587
------------------------------------------------------------------


