Path: news.daimi.aau.dk!news.uni-c.dk!newsfeed.sunet.se!news00.sunet.se!sunic!mn6.swip.net!plug.news.pipex.net!pipex!tube.news.pipex.net!pipex!lade.news.pipex.net!pipex!tank.news.pipex.net!pipex!news.mathworks.com!newsfeed.internetmci.com!news2.cais.net!news.cais.net!nntp.uio.no!ifi.uio.no!usenet From: olag@beli.ifi.uio.no (Ola Fosheim Grøstad) Newsgroups: comp.lang.beta Subject: Re: Pattern names- how to get? Date: 29 Apr 1996 17:31:07 GMT Organization: Dept. of Informatics, University of Oslo, Norway Lines: 24 Message-ID: <4m2ucr$v68@glitnir.ifi.uio.no> References: <3180DC48.5319@daimi.aau.dk> NNTP-Posting-Host: beli.ifi.uio.no X-Newsreader: knews 0.9.5 In article <3180DC48.5319@daimi.aau.dk>, Kim Jersin writes: >How do I get a texttual representation of a pattern? I suppose the distribution/persistence system is what you want? But, I've recently finished a project where I gave all major objects methods for returning their contents in a "semi-readable" format, as well as methods for reading this format from at text(stream) and detecting when they have read all they need. To achieve this I had to implement my own versions of integer, lists etc.. This is a fairly powerful concept, as composite objects only need to know about these two methods. If all "textual" objects have a common subpattern with these methods as virtuals, then that is all it needs to know. (there is an additional requirement, of course, they should either agree on some kind of reserved separator sign (for instance left and right parantheses) or let the first entry in the text describe the size of this part of the structure. But this is perhaps not what you tried to ask for? -- * Ola Fosheim Groestad (http://www.ifi.uio.no/~olag) *