Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,42 @@
' FB 1.05.0 Win64
#Lang "fblite"
Option Gosub '' enables Gosub to be used
' Using gosub to simulate a nested function
Function fib(n As UInteger) As UInteger
Gosub nestedFib
Exit Function
nestedFib:
fib = IIf(n < 2, n, fib(n - 1) + fib(n - 2))
Return
End Function
' This function simulates (rather messily) gosub by using 2 gotos and would therefore work
' even in the default dialect
Function fib2(n As UInteger) As UInteger
Goto nestedFib
exitFib:
Exit Function
nestedFib:
fib2 = IIf(n < 2, n, fib2(n - 1) + fib2(n - 2))
Goto exitFib
End Function
For i As Integer = 1 To 12
Print fib(i); " ";
Next
Print
For j As Integer = 1 To 12
Print fib2(j); " ";
Next
Print
Print "Press any key to quit"
Sleep