Bug in nested iterations? (was: What is wrong with this?)

Joaquin Sitte j.sitte at qut.edu.au
Thu May 26 04:15:40 UTC 2005


Hi Yoshiki,
 
>> map_ Som new: 30
>> map from: 1 to: map size put: (FloatArray new: 4).
 
>  This sets it up so that only one FloatArray instance is created and
>it will be pointed to by all the 30 slots of 'map' object.
 
>  (map first identityHash) = (map last identityHash)
 
>will be true.
 
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  separate vector for every element in the map?
 
Many thanks
 
Joaquin
 
 
=====================================================
Dr. Joaquin Sitte, Associate Professor.
Head, Smart Devices Lab
School of Software Engineering and Data Communication
Faculty of Information Technology
Queensland University of Technology
GPO Box 2434, Brisbane, Q 4001
Australia
Phone +61 7 3864 9325
Fax +61 7 3864 9390
e-mail j.sitte at qut.edu.au 
homepage  <http://www.fit.qut.edu.au/~sitte>
http://www.fit.qut.edu.au/~sitte
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20050526/7fa8e4dc/attachment.htm


More information about the Squeak-dev mailing list