On Tue, Feb 03, 2004 at 02:42:35PM -0600, Lyle Johnson wrote: > Elias Athanasopoulos wrote: > > >Suppose: > > > >pool = [1.2, 2.434, 1.132, 1.1334] > >foo = 0.0 > >pool.each do |x| > > foo = x # foo changes value and actual address in mem > >end > > > >Can I give foo the value *only* of x but not change its > >actual address in memory? > > I don't think so, because foo is a reference to a Float object, and > Float objects are immutable. In contrast, if foo were a reference to Thanks Lyle for the quick reply. What I wanted to do was something I could do in C like: RFLOAT(foo)->value = RFLOAT(x)->value; I thought if Ruby could do this ad hoc for Float objects. Regards, -- University of Athens I bet the human brain Physics Department is a kludge --Marvin Minsky