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,8 @@
' FB 1.05.0 Win64
Dim s(1 To 4) As String = {"&H1a", "26", "&O32", "&B11010"} '' 26 in various bases
For i As Integer = 1 To 4
Print s(i); Tab(9); "="; CInt(s(i))
Next
Sleep

View file

@ -0,0 +1,9 @@
import strutils
echo parseInt "10" # 10
echo parseHexInt "0x10" # 16
echo parseHexInt "10" # 16
echo parseOctInt "0o120" # 80
echo parseOctInt "120" # 80

View file

@ -0,0 +1,6 @@
?scanf("1234","%d")
?scanf("0b10101010","%d")
?scanf("#ABCD","%d")
?scanf("#FFFFFFFF","%f")
?scanf("0xFFFFFFFF","%f")
?scanf("0o377","%o")

View file

@ -0,0 +1,3 @@
see number("0") + nl
see number("123456789") + nl
see number("-987654321") + nl

View file

@ -0,0 +1,15 @@
var dec = '0123459';
var hex_noprefix = 'abcf123';
var hex_withprefix = '0xabcf123';
var oct_noprefix = '7651';
var oct_withprefix = '07651';
var bin_noprefix = '101011001';
var bin_withprefix = '0b101011001';
say dec.num; # => 123459
say hex_noprefix.hex; # => 180154659
say hex_withprefix.hex; # => 180154659
say oct_noprefix.oct; # => 4009
say oct_withprefix.oct; # => 4009
say bin_noprefix.bin; # => 345
say bin_withprefix.bin; # => 345