| Allegro CL version 6.2 Unrevised from 6.1 |
Arguments: (var buffer &key external-format) forms
Similar to with-output-to-string but with an octet buffer
(a vector with element type (unsigned-byte 8)
or
(signed-byte 8)
) instead of a lisp string. The
external-format argument should be the name of an
external-format, or :default
will cause it to be
looked up in the locale. with-output-to-buffer is implemented using a
buffer-output-simple-stream
.
The bufferargument can either be an octet buffer
(described above) or nil
. If it is nil
, the stream acts like a counting bit-bucket: no
output is generated, and so no overflow can occur, but the
file-position of the stream can be queried at the end of the write.
This allows the following to be done:
cl-user(1): (with-output-to-buffer (stm nil) (write-string "hello" stm) (file-position stm)) 5 cl-user(2):
See streams.htm for information on the simple-streams implementation in Allegro CL.
Copyright (c) 1998-2002, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 6.2. This page was not revised from the 6.1 page.
Created 2002.2.26.
| Allegro CL version 6.2 Unrevised from 6.1 |