Re: named array

new topic     » goto parent     » topic index » view thread      » older message » newer message
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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu