[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
I came across an inconsistency when using make-string-input-stream
using the following piece of code:
===================================================================
(defun char-ex-string (string-input-stream)
(let (character)
(terpri)
(loop
(setf character
(read-char string-input-stream nil 'eof))
(if (equal character 'eof)
(return nil))
(princ (string character)))))
(setf in-stream (make-string-input-stream "hello"))
(char-ex-string in-stream)
;; this gives the desired output : hello
;; but when I try
(setf in-stream
(make-string-input-stream "abcdefghijk" 3 7))
(char-ex-string in-stream)
;; I get the output : defg , instead of the expected defgh
================================================================
I would be glad if someone can enlighten me on what is going on.
H. I. SALEH
salehh@atlantis.cs.orst.edu