Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
|
|
@ -0,0 +1,33 @@
|
|||
' FB 1.05.0 Win64
|
||||
|
||||
Type Closure
|
||||
Private:
|
||||
index As Integer
|
||||
Public:
|
||||
Declare Constructor(index As Integer = 0)
|
||||
Declare Function Square As Integer
|
||||
End Type
|
||||
|
||||
Constructor Closure(index As Integer = 0)
|
||||
This.index = index
|
||||
End Constructor
|
||||
|
||||
Function Closure.Square As Integer
|
||||
Return index * index
|
||||
End Function
|
||||
|
||||
Dim a(1 To 10) As Closure
|
||||
|
||||
' create Closure objects which capture their index
|
||||
For i As Integer = 1 To 10
|
||||
a(i) = Closure(i)
|
||||
Next
|
||||
|
||||
' call the Square method on all but the last object
|
||||
For i As Integer = 1 to 9
|
||||
Print a(i).Square
|
||||
Next
|
||||
|
||||
Print
|
||||
Print "Press any key to quit"
|
||||
Sleep
|
||||
Loading…
Add table
Add a link
Reference in a new issue