<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Ken,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I think the issue is that when you change the position of the stream you are really telling it to limit the write stream to that position.  It's a way to hit backspace and start over.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">so if I say position is 2 then I get the first two elements only.  </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">ws := WriteStream on: #[].<br>ws nextPut: 65.<br>ws nextPut: 80.<br>ws nextPut: 50.<br>ws contents printString. '#[65 80 50]'<br>"limit to position 2"<br>ws position: 2.<br>ws contents printString.  '#[65 80]'<br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">"I can then write more from there."<br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">ws nextPut: 51.<br></div><div class="gmail_default" style="font-size:small">ws contents printString.  '#[65 80 51]'<br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">All the best,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Ron Teitelbaum </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 29, 2021 at 3:10 PM <<a href="mailto:ken.dickey@whidbey.com">ken.dickey@whidbey.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Greetings,<br>
<br>
Perhaps some one out there can help me understand some history.<br>
<br>
ANSI Smalltalk 5.9.1.2 indicates that #contents "Returns a collection <br>
containing the complete contents of the stream."<br>
<br>
WriteStream>>contents does not do this.  ReadWriteStream>>contents does <br>
do this.<br>
<br>
Why the difference?<br>
<br>
vvv===vvv<br>
ws := WriteStream on: #[].<br>
ws nextPut: 65.<br>
ws nextPut: 80.<br>
ws contents printString. '#[65 80]'<br>
"Second result is expected to match 1st"<br>
ws position: 1.<br>
ws contents printString. '#[65]'<br>
^^^===^^^<br>
<br>
I am puzzled.  Must be some reason for this lost in the sands of time..<br>
<br>
Thanks for any help uncovering the history and rationale here,<br>
-KenD<br>
<br>
</blockquote></div>