guile-user
[Top][All Lists]
Advanced

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

Re: Is there any way to save SCM?


From: Dirk Herrmann
Subject: Re: Is there any way to save SCM?
Date: Mon, 17 Sep 2001 22:41:23 +0200 (MEST)

On Sun, 16 Sep 2001, ½Å¼º±¹(9) wrote:

> I'm a good skilled user using neither guile nor scheme.
> So I don't know how to save general scheme object include
> procedures.
> 
> I want to know how to store general scheme object (include
> lambda expression) to a file.

In general, you could use the function `write' to generate a written
representation of your object that can be read in again using
`read'.  This, however, does not work for functions and smobs.  I don't
even know whether it works for circular objects.  You can, however, print
arbitrary scheme expressions into a file and use a combination of `read'
and `eval' to read the expressions and evaluate them.  The evaluation can
then create any kind of object that scheme code can create.  This,
however, can lead to other problems, for example if you don't know where
your input files come from:  Malicious code can be used to intrude your
system...

Best regards,
Dirk Herrmann




reply via email to

[Prev in Thread] Current Thread [Next in Thread]