[Gauche-devel-jp] open/closeの説明

アーカイブの一覧に戻る

Kimura Fuyuki fuyuk****@nigre*****
2004年 1月 15日 (木) 10:51:30 JST


call-with-input-fileが取るのは:if-existsではなくて:if-does-not-exist 
だと思うのですが、どうでしょう。

--- doc/corelib.texi	22 Dec 2003 02:43:09 -0000	1.23
+++ doc/corelib.texi	15 Jan 2004 01:30:16 -0000
@@ -6403,7 +6403,7 @@
 @c COMMON
 @end defun
 
- @ defun call-with-input-file string proc &keyword if-exists buffering element-type
+ @ defun call-with-input-file string proc &keyword if-does-not-exist buffering element-type
 @defunx call-with-output-file string proc &keyword if-does-not-exist if-exists buffering element-type
 [R5RS]
 @c EN
@@ -6441,7 +6441,7 @@
 @c COMMON
 @end defun
 
- @ defun with-input-from-file string thunk &keyword if-exists buffering element-type
+ @ defun with-input-from-file string thunk &keyword if-does-not-exist buffering element-type
 @defunx with-output-to-file string thunk &keyword if-does-not-exist if-exists buffering element-type
 [R5RS]
 @c EN

それと、with-input-from-fileのところの

        但しif-existsやif-does-not-existに#fを指定することは出来ません。
        ファイルがオープンできなかった場合は常にエラーとなります。

という説明は事実と一致していないようです。

(with-input-from-file "/nonexistent" (lambda () #t) :if-does-not-exist #f)
=> #f

-- 
木村 冬樹



Gauche-devel-jp メーリングリストの案内
アーカイブの一覧に戻る