From: Sam Steingold
Subject: make-string-input-stream
Date: 
Message-ID: <un1ne24wu.fsf@ksp.com>
1. is it possible to find out what string was used to create a string
   input stream with `make-string-input-stream'?

2. if I modify the string post-factum, will the stream return the new
   contents?

thanks

-- 
Sam Steingold (http://www.podval.org/~sds)
Micros**t is not the answer.  Micros**t is a question, and the answer is Linux,
(http://www.linux.org) the choice of the GNU (http://www.gnu.org) generation.
I haven't lost my mind -- it's backed up on tape somewhere.
From: Barry Margolin
Subject: Re: make-string-input-stream
Date: 
Message-ID: <Rc9F4.78$YN6.2922@burlma1-snr2>
In article <·············@ksp.com>, Sam Steingold  <···@gnu.org> wrote:
>1. is it possible to find out what string was used to create a string
>   input stream with `make-string-input-stream'?

Apparently not.  Proposal STREAM-ACCESS:ADD-TYPES-PREDICATES-ACCESSORS
added accessors for most of the other stream types, so it would have made
sense for it to have proposed STRING-STREAM-STRING to do this, but it
didn't.

>2. if I modify the string post-factum, will the stream return the new
>   contents?

Nothing specific is ever said about this.  However, the description of
WITH-INPUT-FROM-STRING, which is just a macro that encapsulates creation
and destruction of a string input stream, has a reference to the "Traversal
Rules and Side Effects" section of the standard, so I think it would be
appropriate to consider it the law in this case.  The only restriction on
arrays that it makes is to prohibit adjusting the array or changing its
fill pointer -- you're allowed to modify the array elements themselves.  I
believe this implies that a string stream should not buffer elements
somewhere else -- the string itself should serve as the buffer.

-- 
Barry Margolin, ······@bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.