From: stefan heinrich Date: 2013-07-12T16:23:42+09:00 Subject: Re: create variables depending on counter Hi, > It depends. Where do you get the data from? Is it a fixed set of > values? > etc. ok, give me a try to explain. Lets take a look in the Hash {"I OFF"=>["a8", "1e"], "E OFF"=>["98", "a0"], "E ON"=>["db"], "I ON"=>["99"]} The values "a8", "1e", "98" etc. are random generated values. There are not fixed but they have an interval. Depending on the value if the LSB = 1 it is an ON and LSB = 0 it is a OFF. So normally we can say without looking to the syntax def value_?even(value) return :E_ON if value & 0x01 return :E_OFF end But for a ruby newbie it is very difficult and confusing to understand symbols in ruby. I have read so much articles and looked for example to get it. But I think I need more time to understand symbols. Now what do you suggest me, is it possible to implement this like I explained? -- Posted via http://www.ruby-forum.com/.