[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile.info: Reading
From: |
Alex Schroeder |
Subject: |
guile.info: Reading |
Date: |
Mon, 24 Sep 2001 15:07:13 +0200 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7 |
The documentation for drain-input is confusing -- or I am easily
confused being a Scheme newbie. :)
- primitive: drain-input port
Drain PORT's read buffers (including any pushed-back characters)
and return the content as a single string.
Here we see that the file "players" is not empty:
guile> (call-with-input-file "players" read-line)
"Alpha"
This is what I get when I call drain-input:
guile> (call-with-input-file "players" drain-input)
""
What I expected -- based on the documentation -- that drain-input
would read until the end of the file. The result would have been:
"Alpha
Beta
Gamma
etc."
So something in the documentation is not right. What is "content"
referring to?
Alex.
--
http://www.geocities.com/kensanata/
Coffee should be black as hell, strong as death and sweet as love.
-- Turkish proverb
- guile.info: Reading,
Alex Schroeder <=