[racket] Question about reading string on a file

From: Jos Koot (jos.koot at telefonica.net)
Date: Tue May 17 05:17:30 EDT 2011

Are you sure you output the A-list in write-mode?
Using display (or (printf "~a" A-list)) would give you exactly the output
you describe.
You may want to use symbol? and string? in order to inspect the input.


From: users-bounces at racket-lang.org [mailto:users-bounces at racket-lang.org]
On Behalf Of jimmy dura
Sent: 17 May 2011 11:05
To: users at racket-lang.org
Subject: [racket] Question about reading string on a file

Hello, i am a french student, sorry for my english.
 My problem is :
 I want to write an A-List on a file "Diary.txt" , this A-list contains
couples of a symbol and a string. Example : '((17/05/2011 "Hello guys")
(18/05/2011 "good morning")) .
But I have a problem when I read this A-List from the file with the function
(read p-in), it transforms strings to symbol .. like that : '((17/05/2011
Hello guys) (18/05/2011 good morning))
How to get back the A-List with strings like on my example ?

Thanks, jimmy.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20110517/16bd8ba1/attachment.html>

Posted on the users mailing list.