home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!crdgw1!ge-dab!puma.ATL.GE.COM!newshost!sjameson
- From: sjameson@fergie.dnet.ge.com (Stephen M Jameson)
- Newsgroups: comp.lang.lisp
- Subject: Function to print in #S format
- Message-ID: <SJAMESON.92Sep8161926@fergie.dnet.ge.com>
- Date: 8 Sep 92 20:19:26 GMT
- Sender: news@puma.ATL.GE.COM (USENET News System)
- Reply-To: sjameson@atl.ge.com
- Organization: General Electric Advanced Technology Labs
- Lines: 23
-
- This ought to be a FAQ, but I haven't seen it. How do I print a structure in
- #S-format, i.e. so that the reader will automatically reconstruct the
- structure? The application is obvious: I would like to have a :PRINT-FUNCTION
- specified in the DEFSTRUCT which will print in a concise, non-readable format
- if a certain switch is set, and print in the verbose, readable format if the
- switch is not set. On the Symbolics I figured out a way to do it but it did
- not seem portable, and CLTL2 doesn't mention anything beyond the semantics of
- #S format, and that if you don't specify a :PRINT-FUNCTION, "a function is
- provided for the structure which will print out all its slots using #S syntax."
-
- -- Steve
-
-
- --
- Steve Jameson General Electric Aerospace
- sjameson@atl.ge.com Advanced Technology Laboratories
- Moorestown, New Jersey
- ****************************************************************************
- ** . . . but I do not love the sword for its sharpness, nor the arrow **
- ** for its swiftness, nor the warrior for his glory. I love only that **
- ** which they defend . . . **
- ** -- Faramir, "The Two Towers" **
- ****************************************************************************
-