[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: writing string to a file
From: |
Dale P. Smith |
Subject: |
Re: writing string to a file |
Date: |
Wed, 5 Mar 2003 16:57:40 -0500 |
On Wed, 05 Mar 2003 21:42:17 +0000
"Dr. Peter Ivanyi" <address@hidden> wrote:
> Hi,
>
> Is there a way to write a string into a file/port as a string?
> What I mean is that instead of this
>
> guile> (write-line "23")
> 23
> guile>
>
> I would get something like this:
>
> guile> (write-line "23")
> "23"
> guile>
>
> so when I write out an s-expr I will be able to read it back in
> the same way.
That is what "write" is for:
guile> address@hidden:~$ guile
guile> (display "23") (newline)
23
guile> (write "23") (newline)
"23"
"write" allows you to read s-expr back in with "read".
-Dale
--
Dale P. Smith
Senior Systems Consultant, | Treasurer,
Altus Technologies Corporation | Cleveland Linux Users Group
address@hidden | http://cleveland.lug.net
440-746-9000 x239 |