Tristin Davis
7/3/2008 1:13:00 PM
[Note: parts of this message were removed to make it a legal post.]
So its just a style thing. That answers my question. Thank you.
On Thu, Jul 3, 2008 at 8:03 AM, Rolando Abarca <funkaster@gmail.com> 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.
>
>
>
>
>
>