Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -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