[Ecls-list] Sequence streams
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at googlemail.com
Sun Aug 28 09:40:29 UTC 2011
Hi Matthew, I have fixed two errors. One is that the sequence input streams
did not update the read pointer. The other one is that sequence streams with
strings now ignore the external format. However, while the following code
now works, I do not understand what you are trying to accomplish with it:
On Sun, Aug 28, 2011 at 2:22 AM, Matthew Mondor <mm_lists at pulsar-zone.net>wrote:
> (setf *string*
> (make-array 16
> :element-type 'character
> :fill-pointer 0))
> ;;; -> ""
>
> (with-open-stream
> (s (ext:make-sequence-output-stream *string*))
> (loop
> for b across *bytes*
> do
> (write-byte b s))
> *string*)
>
What is the use of writing bytes to a string? In many cases you may end up
with corrupt sequences, since the bytes produced by a external format do not
need to correspond to valid strings in the latin-1 and ucs4 formats which
are used internally by ECL.
Juanjo
--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20110828/72f20568/attachment.html>
More information about the ecl-devel
mailing list