From dd657ad3f1428b026486db3ec36691df17ddf515 Mon Sep 17 00:00:00 2001 From: "Steve M. Robbins" Date: Sat, 22 Oct 2011 04:54:51 +0200 Subject: Import nyquist_3.05.orig.tar.gz [dgit import orig nyquist_3.05.orig.tar.gz] --- .../reference/make-string-output-stream.htm | 79 ++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 docsrc/xlisp/xlisp-doc/reference/make-string-output-stream.htm (limited to 'docsrc/xlisp/xlisp-doc/reference/make-string-output-stream.htm') diff --git a/docsrc/xlisp/xlisp-doc/reference/make-string-output-stream.htm b/docsrc/xlisp/xlisp-doc/reference/make-string-output-stream.htm new file mode 100644 index 0000000..ae2cfe2 --- /dev/null +++ b/docsrc/xlisp/xlisp-doc/reference/make-string-output-stream.htm @@ -0,0 +1,79 @@ +XLISP make-string-output-stream + + + + + + + +Nyquist / XLISP 2.0  -  +Contents | +Tutorials | +Examples | +Reference + +
+ +

make-string-output-stream

+ +
+ +

+ + + + + + + + + + +
Type:  -  function (subr)
Source:  -  xlfio.c

+ +

Syntax

+ +
+
(make-string-output-stream)
+
returns - an unnamed output stream
+
+ +

Description

+ +

The 'make-string-output-stream' function creates and returns an unnamed +output stream. The stream can then be used as any other stream object.

+ +

Examples

+ +
+(make-string-output-stream)             ; returns #<Unnamed-Stream: #2d9c0>
+
+(setq out (make-string-output-stream))  ; returns #<Unnamed-Stream: #2d95c>
+
+(format out "fee fi fo fum ")           ; \
+(format out "I smell the blood of ")    ;  fill up output stream
+(format out "Elmer Fudd")               ; /
+(get-output-stream-string out)          ; returns "fee fi fo fum I smell the blood of Elmer Fudd"
+
+(format out "~%now what")               ; add more to output stream
+(get-output-stream-string out)          ; returns "\nnow what"
+
+(format out "hello")                    ; add more to output stream
+(read out)                              ; returns HELLO
+
+ +

See the +make-string-output-stream +function in the XLISP 2.0 manual.

+ +

  Back to Top

+ +
+ +Nyquist / XLISP 2.0  -  +Contents | +Tutorials | +Examples | +Reference + + \ No newline at end of file -- cgit v1.2.3