lispdoc - results for with-output-to-sequence |
(flexi-streams:with-output-to-sequence (var &key as-list (element-type ''octet) transformer) &body body) | Function: Creates an IN-MEMORY output stream, binds VAR to this stream and then executes the code in BODY. The stream stores data of type ELEMENT-TYPE (a subtype of OCTET) which is (optionally) transformed by the function TRANSFORMER prior to storage. The stream is automatically closed on exit from WITH-OUTPUT-TO-SEQUENCE, no matter whether the exit is normal or abnormal. The return value of this macro is a vector (or a list if AS-LIST is true) containing the octets that were sent to the stream within BODY.
|
(with-output-to-string (var &optional string &key (element-type ''character)) &body forms-decls) | Undocumented
|
Example:(defun process-coords (input) (with-output-to-string (s) (format-number s input))) | Mentioned in: CLtL2 - 21.2. Creating New Streams CLtL2 - 21.3. Operations on Streams CLtL2 - 9.1. Declaration Syntax HyperSpec - Macro WITH-OUTPUT-TO-STRING On Lisp - Symbols and Strings PCL - other kinds of io PCL - strings in binary files Successful Lisp - chapter19 |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| By Bill Moorier |