<div dir="ltr"><br><br><div class="gmail_quote">On Wed, Jul 23, 2008 at 12:05 PM, Matthew Flatt <<a href="mailto:mflatt@cs.utah.edu">mflatt@cs.utah.edu</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">> I thought I allocated `bytes-in` & `peeked` based on the `len`, so `len` can<br>
> be returned - apparently that's not the case? What did I miss?<br>
<br>
</div></div>You computed `len' based on the given byte string, but that byte<br>
string's length might be larger than the number of bytes available in<br>
the port. The result should be the number of bytes actually read or<br>
peeked.<br>
<font color="#888888"><br></font></blockquote><div><br>I see - I actually thought `len` always equals 1. When I wrote the code I traced `read-in` and observed the size of given bytes; I must have been reading the port with `read-byte` at the time - that was my misunderstanding. Now that you explained it it's clear where the random bytes came from - `copy-port` uses a much larger buffer... <br>
<br>Thanks again! ;)<br>yc<br><br></div></div></div>