chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

It read from the input port when running (read-line (open-input-file "f


From: 廖海文
Subject: It read from the input port when running (read-line (open-input-file "foo.txt")) in REPL, it is chararter by chararter or byte by byte?
Date: Fri, 3 Feb 2023 14:26:32 +0800 (CST)

Hi
One question is that  Line 64 (cond ((##sys#slot (##sys#slot p 2) 8) => (lambda (rl) (rl p limit)))  of the function read-line in the file ./chicken-5.2.0/extra.scm , It read from the input  port when running (read-line (open-input-file "foo.txt")) in REPL, it is character by character or byte by byte?
The content of foo.txt  file is foo\rtee.

The output of running (read-line (open-input-file "foo.txt"))  is "foo\\rtee", sound like it is that read character by character, but most of implementation read by fget in the backend, which is byte and byte for input-file.

There is a survey in the below linker.
https://github.com/schemedoc/surveys/issues/33

 

Thanks in advance.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]