<div>Hello all,</div>
<div> </div>
<div>Here's the code:</div>
<div>(define write-to-file<br> (lambda (input)<br> (call-with-output-file "g:\\my\\a.txt"<br> (lambda (p)<br> (display input p)<br> (fprintf p "~n ~a as a string is ~s." '(3 4) "(3 4)")) 'update)))
</div>
<div> </div>
<div>But after open a.txt, the newline is not written to the file.</div>
<div> </div>
<div>I tried the following too:</div>
<div> (call-with-output-file "g:\\my\\5.txt"<br> (lambda (p) <br> (display "aaa" p)<br> (display newline p)))</div>
<div> </div>
<div>And the text file is :</div>
<div>aaa#<primitive:newline></div>
<div> </div>
<div>How can I write a newline to a file?</div>
<div> </div>
<div>thanks & regards,</div>
<div>Linda Lian</div>