Re: [Vala] 'out' directive works improperly
- From: Nor Jaidi Tuah <norjaidi tuah ubd edu bn>
- To: <vala-list gnome org>
- Subject: Re: [Vala] 'out' directive works improperly
- Date: Tue, 5 Apr 2011 15:06:43 +0800
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]