Re: [Vala] anonymous functions
- From: Thijs Vermeir <thijsvermeir gmail com>
- To: Sam Liddicott <sam liddicott com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] anonymous functions
- Date: Tue, 15 Jul 2008 11:44:50 +0200
Sam Liddicott wrote:
* Jared Moore wrote, On 15/07/08 10:40:
And in the advanced example:
http://live.gnome.org/Vala/AdvancedSample
what does the s signify in
this.foo += s => {
stdout.printf ("Lambda expression %s!\n", name);
};
's' is the formal parameter of the function, just like s and p are
formal parameters in the first example. You could put parentheses
around it if you like, but you don't need to because in that case
there's only one parameter.
Thanks.
In that example do you know what s signifies? - The signal foo
doesn't seem to take any parameters.
The s is the object that is firing the signal. In this case an
instance of the AdvancedSample class.
Gr,
Thijs
Sam
------------------------------------------------------------------------
_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]