[Pharo-project] #IdentityIncludes: for FloatArray
try to inspect: (FloatArray new:1)at: 1 put: 2.5 ; yourself and print: self identityIncludes: self anyOne It returns false. Is it a 'normal' comportment ?
FloatArray is a raw array of bits interpreted as single precision (32 bits) floats. It does not contain any object pointer, only the content (value). At each access #at: will create a new Float (64 bits). So you have (self at: 1) ~~ (self at: 1). Does that explain? Nicolas 2009/6/11 Cyrille Delaunay <cyrille.delaunay@etudiant.univ-lille1.fr>:
try to inspect: (FloatArray new:1)at: 1 put: 2.5 ; yourself and print: self identityIncludes: self anyOne
It returns false. Is it a 'normal' comportment ?
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (2)
-
Cyrille Delaunay -
Nicolas Cellier