io: with-output-stream* example
parent
c0ff39d129
commit
1c74268af7
|
|
@ -283,6 +283,11 @@ HELP: with-input-stream*
|
||||||
HELP: with-output-stream*
|
HELP: with-output-stream*
|
||||||
{ $values { "stream" "an output stream" } { "quot" quotation } }
|
{ $values { "stream" "an output stream" } { "quot" quotation } }
|
||||||
{ $description "Calls the quotation in a new dynamic scope, with " { $link output-stream } " rebound to " { $snippet "stream" } "." }
|
{ $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 } "." } ;
|
{ $notes "This word does not close the stream. Compare with " { $link with-output-stream } "." } ;
|
||||||
|
|
||||||
HELP: bl
|
HELP: bl
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue