[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

webserver and print-struct



Hi all

I have problems with the following function.
I am writing a litle guest book using the PLT web-server.
The entries in the book is internally represented by a list of
structures. I want to save the structures and retrieve them later,
therefore I use (print-struct #t) so that the structures are printed as
vectors. When I read them I convert them. My problem is
that the web-server apparently does not respect the parameter,
i.e. does not print vectors but prints #<struct..> stuff in stead.

(define (save-book)
  (let ([port (open-output-file filename 'replace)])
    (print-struct #t)
    (print book port)
    (close-output-port port)))

Ideas?

--
Jens Axel Søgaard