Michele La Monaca scripsit:

> ... but binaries do. Yet, open-input-file will open them as text files
> in Windows and as binaries in Unix (by default).

The short answer to that is that there is a way of opening binary
files as binary: with (open-input-file "foo" #:binary) in Chicken,
open-binary-input-file in R7RS.  In any case, files are opened by
default as text in both Windows and Posix, though in Posix there is no
distinction.  Rarely, if ever, does an application not know if a file
it is opening is to be processed as text or as binary, and applications
that are insensitive to the content of a file (like "cat") can always
use the binary operations.

What is a genuine restriction, imposed for backward compatibility, is
that current-input-port and current-output-port initiall refer to text
mode ports.

-- 
John Cowan          http://www.ccil.org/~cowan        co...@ccil.org
"Make a case, man; you're full of naked assertions, just like Nietzsche."
"Oh, i suffer from that, too.  But you know, naked assertions or GTFO."
                        --heard on #scheme, sorta

_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to