1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 22:31:12 +02:00

(String Ports): In call-with-output-string, note proc

should not close the port.  In get-output-string, note string must be
gotten before closing the port.
This commit is contained in:
Kevin Ryde 2003-10-02 00:25:05 +00:00
parent d5c4160240
commit a1e7d87423

View file

@ -777,7 +777,7 @@ file port facilities:
@deffnx {C Function} scm_call_with_output_string (proc)
Calls the one-argument procedure @var{proc} with a newly created output
port. When the function returns, the string composed of the characters
written into the port is returned.
written into the port is returned. @var{proc} should not close the port.
@end deffn
@deffn {Scheme Procedure} call-with-input-string string proc
@ -821,6 +821,9 @@ inaccessible.
Given an output port created by @code{open-output-string},
return a string consisting of the characters that have been
output to the port so far.
@code{get-output-string} must be used before closing @var{port}, once
closed the string cannot be obtained.
@end deffn
A string port can be used in many procedures which accept a port