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
7
Task/String-concatenation/Apex/string-concatenation.apex
Normal file
7
Task/String-concatenation/Apex/string-concatenation.apex
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
String s1 = 'Hello ';
|
||||
String s2 = 'Salesforce Developer!';
|
||||
|
||||
String s3 = s1+s2;
|
||||
|
||||
// Print output
|
||||
System.debug(s3);
|
||||
5
Task/String-concatenation/Axe/string-concatenation.axe
Normal file
5
Task/String-concatenation/Axe/string-concatenation.axe
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
Lbl CONCAT
|
||||
Copy(r₁,L₁,length(r₁))
|
||||
Copy(r₂,L₁+length(r₁),length(r₂)+1)
|
||||
L₁
|
||||
Return
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
"Hello" => string A;
|
||||
A + " World!" => string B;
|
||||
<<< B >>>;
|
||||
6
Task/String-concatenation/ERRE/string-concatenation.erre
Normal file
6
Task/String-concatenation/ERRE/string-concatenation.erre
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
..........
|
||||
S$="HELLO"
|
||||
PRINT(S$;" LITERAL") ! or S$+" LITERAL"
|
||||
S2$=S$+" LITERAL"
|
||||
PRINT(S2$)
|
||||
..........
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
' FB 1.05.0 Win64
|
||||
|
||||
Var s1 = "String"
|
||||
Var s2 = s1 + " concatenation"
|
||||
Print s1
|
||||
Print s2
|
||||
Sleep
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
local(x = 'Hello')
|
||||
local(y = #x + ', World!')
|
||||
#x // Hello
|
||||
#y // Hello, World!
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
a = "Hello"
|
||||
b = a & " world!"
|
||||
put b
|
||||
-- "Hello world!"
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
local str="live"
|
||||
put str & "code" into str2
|
||||
put str && str2
|
||||
6
Task/String-concatenation/Nim/string-concatenation-1.nim
Normal file
6
Task/String-concatenation/Nim/string-concatenation-1.nim
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
var str, str1 = "String"
|
||||
echo(str & " literal.")
|
||||
str1 = str1 & " literal."
|
||||
echo(str1)
|
||||
|
||||
# -> String literal.
|
||||
4
Task/String-concatenation/Nim/string-concatenation-2.nim
Normal file
4
Task/String-concatenation/Nim/string-concatenation-2.nim
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
var str1 = "String"
|
||||
echo(join([str1, " literal.", "HelloWorld!"], "~~"))
|
||||
|
||||
# -> String~~ literal.~~HelloWorld!
|
||||
4
Task/String-concatenation/Nim/string-concatenation-3.nim
Normal file
4
Task/String-concatenation/Nim/string-concatenation-3.nim
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
var str1 = "String"
|
||||
echo "$# $# $#" % [str1, "literal.", "HelloWorld!"]
|
||||
|
||||
# -> String literal. HelloWorld!
|
||||
|
|
@ -0,0 +1 @@
|
|||
"Hello" dup " World!" + .s
|
||||
11
Task/String-concatenation/PHL/string-concatenation.phl
Normal file
11
Task/String-concatenation/PHL/string-concatenation.phl
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
module stringcat;
|
||||
|
||||
extern printf;
|
||||
|
||||
@Integer main [
|
||||
var a = "hello";
|
||||
var b = a + " literal";
|
||||
printf("%s\n", b);
|
||||
|
||||
return 0;
|
||||
]
|
||||
5
Task/String-concatenation/Phix/string-concatenation.phix
Normal file
5
Task/String-concatenation/Phix/string-concatenation.phix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
string s1 = "at" ?s1
|
||||
string s2 = "c"&s1 ?s2
|
||||
string s3 = "s"&s1 ?s3
|
||||
string s4 = "m"&s1 ?s4
|
||||
string s5 = "The "&s2&" "&s3&" on the "&s4&"." ?s5
|
||||
4
Task/String-concatenation/Ring/string-concatenation.ring
Normal file
4
Task/String-concatenation/Ring/string-concatenation.ring
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
aString = "Welcome to the "
|
||||
bString = "Ring Programming Language"
|
||||
|
||||
see astring + bString + nl
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
var s = 'hello';
|
||||
say s+' literal';
|
||||
var s1 = s+' literal';
|
||||
say s1;
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
s += ' literal';
|
||||
say s;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
let s1 = "Hello";
|
||||
let s2 = " world!";
|
||||
print(s1 .. s2); // prints "Hello world!"
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
let s = "hello"
|
||||
println(s + " literal")
|
||||
let s1 = s + " literal"
|
||||
println(s1)
|
||||
9
Task/String-concatenation/Ursa/string-concatenation.ursa
Normal file
9
Task/String-concatenation/Ursa/string-concatenation.ursa
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
decl string s1 s2
|
||||
# make s1 contain "hello "
|
||||
set s1 "hello "
|
||||
|
||||
# set s2 to contain s1 and "world"
|
||||
set s2 (+ s1 "world")
|
||||
|
||||
# outputs "hello world"
|
||||
out s2 endl console
|
||||
1
Task/String-concatenation/jq/string-concatenation.jq
Normal file
1
Task/String-concatenation/jq/string-concatenation.jq
Normal file
|
|
@ -0,0 +1 @@
|
|||
"hello" as $s | $s + " there!"
|
||||
Loading…
Add table
Add a link
Reference in a new issue