From: saladin.mundi@... Date: 2007-11-17T00:05:05+09:00 Subject: Some Core Questions This is a multi-part message in MIME format. ------=_NextPart_000_0097_01C8286A.7638D6A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi guys, first time using the mailing list, hope im not doing anything = wrongt :) ok ive got some questions about the ruby core 1. C-Methods: how is it possible to do a printf command for the = delivered VALUE parameters? Example VALUE rb_funcall(VALUE recv, ID mid, int n, ...) { ... } /* for example I would like to get the value of the variable recv printed = on the command line using something like printf(recv);=20 reason for that is, that is just want to see what values any variable = of the datatype VALUE has got I know that c types can be "easily" printed, like the type ID : = printf("%s", rb_id2name(nameOfVariableID)) */ 2. C-Method: how can I get to know the datatype of a VALUE variable? Example VALUE rb_somemethod(VALUE somevalue, VALUE anothervalue) { char s =3D TYPE(somevalue); /* imagined code */ printf("%s",s); /* imagined code */ } 3. C-Method: how can I call a method which is defined somewhere by using = C ? Example # Rubycode class RubyClass def x() p "x" end end /*C-code*/ void rb_call_a_func() { /*imagined code*/ getClass("RubyClass").getMethod("x").execute(); } =20 Thanks for your help, and sorry if I posted it in the wrong "section" ------=_NextPart_000_0097_01C8286A.7638D6A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable