<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
 --></style><title>Re: Bug in nested iterations? (was:  What is wrong
wit</title></head><body>
<div>At 2:15 PM +1000 5/26/05, Joaquin Sitte wrote:</div>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">This
explains the behaviour. But this does not seem to be a terribly useful
way of doing things, at least not for my purpose. What is the proper
way to define a&nbsp; separate vector for every element in the
map?</font></blockquote>
<div><br></div>
<div><br></div>
<div>Hi Joaquin,</div>
<div><br></div>
<div>One simple way would be...</div>
<div><br></div>
<div>1 to: map size do:</div>
<div><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>[:i |
map at: i put: (FloatArray new: 4)]</div>
<div><br></div>
<div>Cheers,</div>
<div><br></div>
<div>&nbsp;-- Scott</div>
<div><br></div>
<div>--------</div>
<div><br></div>
<blockquote type="cite" cite><font size="-1">&gt;&gt; map_ Som new:
30</font><br>
</blockquote>
<blockquote type="cite" cite><font size="-1">&gt;&gt; map from: 1 to:
map size put: (FloatArray new: 4).</font></blockquote>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite" cite><font size="-1">&gt;&nbsp; This sets it
up so that only one FloatArray instance is created and</font><br>
</blockquote>
<blockquote type="cite" cite><font size="-1">&gt;it will be pointed to
by all the 30 slots of 'map' object.</font><br>
</blockquote>
<blockquote type="cite" cite><font size="-1">&gt;&nbsp; (map first
identityHash) = (map last identityHash)</font><br>
</blockquote>
<blockquote type="cite" cite><font size="-1">&gt;will be
true.</font></blockquote>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">This
explains the behaviour. But this does not seem to be a terribly useful
way of doing things, at least not for my purpose. What is the proper
way to define a&nbsp; separate vector for every element in the
map?</font></blockquote>
</body>
</html>