Re: named array
- Posted by TheresNoTime Sep 03, 2013
- 2164 views
andi49 said...
Hi
I'am not sure if my english is good enough, but i will try to explain somethings. If someone knows it better i will be happy if he/she helps with this.
What you do in ruby is very different to what you do in Euphoria. In Ruby you give an 'Object a Name' this name is only valid in the context of the object.
object = { :x => 100, :y => -200, :z => 300 } puts object[ :z ] object1= { :z => 100, :y => -200, :x => 300 } puts object1[ :z ]If you try this, you will see that :z is different.
It is not :z, it is value of hash, associated with :z. Both :z are the same objects. http://ideone.com/zBrG6e