io: with-output-stream* example

db4
Björn Lindqvist 2013-08-12 00:26:06 +02:00 committed by John Benediktsson
parent c0ff39d129
commit 1c74268af7
1 changed files with 5 additions and 0 deletions

View File

@ -283,6 +283,11 @@ HELP: with-input-stream*
HELP: with-output-stream*
{ $values { "stream" "an output stream" } { "quot" quotation } }
{ $description "Calls the quotation in a new dynamic scope, with " { $link output-stream } " rebound to " { $snippet "stream" } "." }
{ $examples
{ $example
"USING: destructors io.encodings.utf8 ;"
"\"/tmp/test.txt\" utf8 <file-writer> dup [ \"Hello!\" write ] with-output-stream* dispose" }
}
{ $notes "This word does not close the stream. Compare with " { $link with-output-stream } "." } ;
HELP: bl