From: Cliff Rosson Date: 2013-03-10T12:41:32+09:00 Subject: Re: Extending Ruby. Little help or guidance if you are willing! --485b397dd4fbf3ce0304d789d412 Content-Type: text/plain; charset=ISO-8859-1 Haven't been able to touch this in a week but I had a few minutes to look at this tonight. I had a few questions. My original ruby method looks similar to this. method(number, pin_hash) > case number > when 1 > on_pins = [:b, :c] > end > > pin_hash.each do |seg, pin| > pins.include?(seg) ? io.write(pin, LOW) : io.write(pin, HIGH) > end So I need to convert everything in my C method to something comparable. In my C code how do I create the on_pins array of symbols? Also based on previous posts. What is the difference between a symbol and an ID? On Wed, Mar 6, 2013 at 1:20 AM, nannasin smith wrote: > I've tried to do some reading but some of this is a bit over my head. > http://www.hqew.net > > -- > Posted via http://www.ruby-forum.com/. > > -- vizualize.me/cliffrosson --485b397dd4fbf3ce0304d789d412 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Haven't been able to touch this in a week but I had a = few minutes to look at this tonight. I had a few questions. My original rub= y method looks similar to this.

method(number, pin_hash)
=A0 case number
=A0 when 1
=A0 =A0 on_pin= s =3D [:b, :c]
=A0 end
=A0=A0
pin_hash.each do |seg, pin|
=A0=A0=A0=A0=A0=A0pins.include?(seg) ? = io.write(pi= n, LOW) : io.write= (pin, <= span class=3D"" style=3D"margin:0px;padding:0px;border:0px;color:rgb(0,128,= 128)">HIGH)
end

So I need to convert everything in my C method to something com= parable. In my C code how do I create the on_pins array of symbols?<= /font>

Also based on previous posts. What is the difference between a symb= ol and an ID?




<= div class=3D"gmail_quote">On Wed, Mar 6, 2013 at 1:20 AM, nannasin smith <lists@ruby-forum.com> wrote:
I've tried to do some = reading but some of this is a bit over my head.
http://www.hqew.net=



--
=
vizualiz= e.me/cliffrosson
--485b397dd4fbf3ce0304d789d412--