From: Tristin Davis Date: 2008-07-03T22:12:58+09:00 Subject: Re: Ruby C API Question ------=_Part_8979_21689178.1215090934961 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline So its just a style thing. That answers my question. Thank you. On Thu, Jul 3, 2008 at 8:03 AM, Rolando Abarca wrote: > On Jul 3, 2008, at 8:48 AM, Tristin Davis wrote: > > I've been going over the Ruby API and I have a couple questions. >> >> Why are the variables defined outside the block? What effect does this >> have >> on the variables? >> > > they are not "outside" the block, it's just a way to define the type of the > variables in the function's signature. This: > > static VALUE >> fsdbm_s_open(argc, argv, klass) >> int argc; >> VALUE *argv; >> VALUE klass; >> { >> > > is the same as this: > > static VALUE > fsdbm_s_open(int argc, VALUE *argv, VALUE klass) > { > > I've always defined my variables inside a block. >> > > now, I'm not sure you can do it that way... > > static VALUE fsdbm_s_open(argc,argv,self) { >> int argc; >> VALUE *argv; >> VALUE self >> /* Etc */ >> } >> > > > regards, > -- > Rolando Abarca M. > > > > > > ------=_Part_8979_21689178.1215090934961--