[plt-scheme] Help on newline when writing to a file
Lian DanHui
linda.lian at gmail.com
Wed Jan 9 04:42:20 EST 2008
Hello all,
Here's the code:
(define write-to-file
(lambda (input)
(call-with-output-file "g:\\my\\a.txt"
(lambda (p)
(display input p)
(fprintf p "~n ~a as a string is ~s." '(3 4) "(3 4)")) 'update)))
But after open a.txt, the newline is not written to the file.
I tried the following too:
(call-with-output-file "g:\\my\\5.txt"
(lambda (p)
(display "aaa" p)
(display newline p)))
And the text file is :
aaa#<primitive:newline>
How can I write a newline to a file?
thanks & regards,
Linda Lian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.cs.brown.edu/pipermail/plt-scheme/attachments/20080109/ee957238/attachment.htm
More information about the plt-scheme
mailing list