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


Suppose after a character is poken from an input-port, that this port
is closed. Is it possible, erroneous or should it signal an error: to
peek that input stream and still get the same character ? More precisely:

(let ((char  #f)
      (input #f) )
  (call-with-input-file "foo.scm"
    (lambda (in)
     (set! input in)
     (set! char (peek-char in)) ) )
  (equal? (peek-char input) char) )      
;;; --> #t  (sci, oscheme, bigloo )
;;; --> error (elk, scm, scheme48 )

Another question is why tab, form-feed and line-feed are mentioned as being
whitespaces and still do not have a proper character name ?