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
2
Task/Topic-variable/Axe/topic-variable.axe
Normal file
2
Task/Topic-variable/Axe/topic-variable.axe
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
3
|
||||
Disp *3▶Dec,i
|
||||
20
Task/Topic-variable/FreeBASIC/topic-variable.freebasic
Normal file
20
Task/Topic-variable/FreeBASIC/topic-variable.freebasic
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
' FB 1.05.0 Win64
|
||||
|
||||
' Three different ways of returning a value from a function
|
||||
|
||||
Function Sum (x As Integer, y As Integer) As Integer
|
||||
Sum = x + y '' using name of function
|
||||
End Function
|
||||
|
||||
Function Sum2 (x As Integer, y As Integer) As Integer
|
||||
Function = x + y '' using Function keyword
|
||||
End Function
|
||||
|
||||
Function Sum3 (x As Integer, y As Integer) As Integer
|
||||
Return x + y '' using Return keyword which always returns immediately
|
||||
End Function
|
||||
|
||||
Print Sum (1, 2)
|
||||
Print Sum2(2, 3)
|
||||
Print Sum3(3, 4)
|
||||
Sleep
|
||||
1
Task/Topic-variable/Oforth/topic-variable.oforth
Normal file
1
Task/Topic-variable/Oforth/topic-variable.oforth
Normal file
|
|
@ -0,0 +1 @@
|
|||
3 dup sq swap sqrt
|
||||
1
Task/Topic-variable/Sidef/topic-variable.sidef
Normal file
1
Task/Topic-variable/Sidef/topic-variable.sidef
Normal file
|
|
@ -0,0 +1 @@
|
|||
say [9,16,25].map {.sqrt}; # prints: [3, 4, 5]
|
||||
Loading…
Add table
Add a link
Reference in a new issue