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,2 @@
Disp 'a'▶Dec,i
Disp 97▶Char,i

View file

@ -0,0 +1,7 @@
' FreeBASIC v1.05.0 win64
Print "a - > "; Asc("a")
Print "98 -> "; Chr(98)
Print
Print "Press any key to exit the program"
Sleep
End

View file

@ -0,0 +1,4 @@
software {
print(number('a'))
print(text([97]))
}

View file

@ -0,0 +1,2 @@
> (list 68 111 110 39 116 32 80 97 110 105 99 46)
"Don't Panic."

View file

@ -0,0 +1,6 @@
> (: io format '"~w~n" '"a")
97
ok
> (: io format '"~p~n" (list '(97)))
"a"
ok

View file

@ -0,0 +1,4 @@
'a'->integer
'A'->integer
97->bytes
65->bytes

View file

@ -0,0 +1,7 @@
-- returns Unicode code point (=ASCII code for ASCII characters) for character
put chartonum("a")
-- 97
-- returns character for Unicode code point (=ASCII code for ASCII characters)
put numtochar(934)
-- Φ

View file

@ -0,0 +1,2 @@
Since 7.0.x works with unicode
put charToNum("") && numToChar(240)

View file

@ -0,0 +1,3 @@
char_code(`a);
it = 97 : int

View file

@ -0,0 +1,3 @@
code_char(97);
it = `a : char

View file

@ -0,0 +1,7 @@
echo ord('a') # echoes 97
echo chr(97) # echoes a
import unicode
echo int("π".runeAt(0)) # echoes 960
echo Rune(960) # echoes π

View file

@ -0,0 +1 @@
'a' println

View file

@ -0,0 +1,2 @@
?'A'
puts(1,65)

View file

@ -0,0 +1,2 @@
see ascii("a") + nl
see char(97) + nl

View file

@ -0,0 +1,4 @@
cmd:>asciiToInt('a')
97
cmd:>intToAscii(97)
'a'

View file

@ -0,0 +1,2 @@
say 'a'.ord; # => 97
say 97.chr; # => 'a'

View file

@ -0,0 +1,4 @@
let c1: UnicodeScalar = "a"
println(c1.value) // prints "97"
let c2: UnicodeScalar = "π"
println(c2.value) // prints "960"

View file

@ -0,0 +1,8 @@
let s1 = "a"
for c in s1.unicodeScalars {
println(c.value) // prints "97"
}
let s2 = "π"
for c in s2.unicodeScalars {
println(c.value) // prints "960"
}

View file

@ -0,0 +1,4 @@
let i1: UInt32 = 97
println(UnicodeScalar(i1)) // prints "a"
let i2: UInt32 = 960
println(UnicodeScalar(i2)) // prints "π"

View file

@ -0,0 +1,4 @@
# outputs the character value for 'a'
out (ord "a") endl console
# outputs the character 'a' given its value
out (chr 97) endl console

View file

@ -0,0 +1,6 @@
[1] (INTEGER->CHAR 97)
#\a
[2] (CHAR->INTEGER #\a)
97

View file

@ -0,0 +1,2 @@
"a" | explode # => [ 97 ]
[97] | implode # => "a"

View file

@ -0,0 +1 @@
def chr: [.] | implode;