Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
R5RS を使用する必要があるファイルに改行を書き込む方法を探していました。以前の質問 (改行ポート) で見ましたが、これはこのバージョンでは機能せず、\n も機能しません。
何か案は?
すべてが一行で書かれている (write "hello" p) (write "w" p)
hellop を含むファイルをくれます
I/O 関数でポートを指定できない場合は、with-output-to-file代わりに次を使用できる場合があります。
with-output-to-file
(with-output-to-file "test.out" (lambda () (display "Hello, world!") (newline)))