Another update from ingydotnet^djgoku
This commit is contained in:
parent
91df62d461
commit
948b86eafa
7604 changed files with 108452 additions and 22726 deletions
3
Task/String-append/Bracmat/string-append.bracmat
Normal file
3
Task/String-append/Bracmat/string-append.bracmat
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
str="Hello";
|
||||
str$(!str " World!"):?str;
|
||||
out$!str;
|
||||
9
Task/String-append/Elena/string-append.elena
Normal file
9
Task/String-append/Elena/string-append.elena
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#import system.
|
||||
|
||||
#symbol program =
|
||||
[
|
||||
#var s := String new:"Hello".
|
||||
s += " World".
|
||||
|
||||
console writeLine:s.
|
||||
].
|
||||
4
Task/String-append/Elixir/string-append.elixir
Normal file
4
Task/String-append/Elixir/string-append.elixir
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
iex(60)> s = "Hello"
|
||||
"Hello"
|
||||
iex(61)> s <> " World!"
|
||||
"Hello World!"
|
||||
2
Task/String-append/Emacs-Lisp/string-append-1.l
Normal file
2
Task/String-append/Emacs-Lisp/string-append-1.l
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(defun glue (str1 str2)
|
||||
(concat str1 str2) )
|
||||
2
Task/String-append/Emacs-Lisp/string-append-2.l
Normal file
2
Task/String-append/Emacs-Lisp/string-append-2.l
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(defun glue (str1 str2)
|
||||
(format "%s%s" str1 str2) )
|
||||
3
Task/String-append/Emacs-Lisp/string-append-3.l
Normal file
3
Task/String-append/Emacs-Lisp/string-append-3.l
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
(setq str "Hello, ")
|
||||
(setq str (glue str "World!") )
|
||||
(insert str)
|
||||
7
Task/String-append/Forth/string-append-1.fth
Normal file
7
Task/String-append/Forth/string-append-1.fth
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
Strings in Forth are simply named memory locations
|
||||
|
||||
create astring 256 allot \ create a "string"
|
||||
|
||||
s" Hello " astring PLACE \ initialize the string
|
||||
|
||||
s" World!" astring +PLACE \ append with "+place"
|
||||
4
Task/String-append/Forth/string-append-2.fth
Normal file
4
Task/String-append/Forth/string-append-2.fth
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
ok
|
||||
s" Hello " astring place ok
|
||||
s" World!" astring +place ok
|
||||
astring count type Hello World! ok
|
||||
10
Task/String-append/Fortran/string-append.f
Normal file
10
Task/String-append/Fortran/string-append.f
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
program main
|
||||
|
||||
character(len=:),allocatable :: str
|
||||
|
||||
str = 'hello'
|
||||
str = str//' world'
|
||||
|
||||
write(*,*) str
|
||||
|
||||
end program main
|
||||
|
|
@ -1,3 +1,7 @@
|
|||
(setq str "foo")
|
||||
|
||||
(push "bar" str -1)
|
||||
; or as an alternative introduced in v.10.1
|
||||
(extend str "bar")
|
||||
|
||||
(println str)
|
||||
|
|
|
|||
3
Task/String-append/PowerShell/string-append.psh
Normal file
3
Task/String-append/PowerShell/string-append.psh
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
$str = "Hello, "
|
||||
$str += "World!"
|
||||
$str
|
||||
3
Task/String-append/VBScript/string-append.vb
Normal file
3
Task/String-append/VBScript/string-append.vb
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
s = "Rosetta"
|
||||
s = s & " Code"
|
||||
WScript.StdOut.Write s
|
||||
Loading…
Add table
Add a link
Reference in a new issue