[Vala] [Genie] Anonymous functions
- From: Nicolas <c r n a wanadoo fr>
- To: Chris Molozian <chris cmoz me>, vala-list gnome org
- Subject: [Vala] [Genie] Anonymous functions
- Date: Fri, 24 Jun 2011 21:40:20 +0200
Chris,
I'm not sure genie support closure, if someone can confirm...
For the delegate, try something like this:
[indent=4]
delegate DelegateType (a : int) : bool
def f1 (a:int) : bool
print "testing delegate value %d", a
return true
def f2 (d:DelegateType, a:int)
var c = d (a)
init
f2 (f1, 5)
Regards,
Nicolas.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]