On Tue, 2011-04-05 at 14:14 +0800, Xu Ming wrote:
> Parameters passed to method by 'out' should be assigned inside the
> callee before it returns. But this compiles successfully:
> 

> void method(ref int a,out int b)
> {
>       a++;
> }
> 

Furthermore, the compiler will accept something like this:
void method(ref int a,out int b)
{
    a = b;  // b not initialized yet!
    a++;
}

Perhaps vala is putting some default value for out parameters.

Nice day
Nor Jaidi Tuah


_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to