update
This commit is contained in:
parent
1f1ad49427
commit
6f050a029e
2496 changed files with 37609 additions and 3031 deletions
8
Task/String-concatenation/Aime/string-concatenation.aime
Normal file
8
Task/String-concatenation/Aime/string-concatenation.aime
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
text s, v;
|
||||
|
||||
s = "Hello";
|
||||
o_text(s);
|
||||
o_newline();
|
||||
v = cat(s, ", World!");
|
||||
o_text(v);
|
||||
o_newline();
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
try
|
||||
set endMsg to "world!"
|
||||
set totMsg to "Hello, " & endMsg
|
||||
display dialog totMsg
|
||||
end try
|
||||
15
Task/String-concatenation/COBOL/string-concatenation.cobol
Normal file
15
Task/String-concatenation/COBOL/string-concatenation.cobol
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
IDENTIFICATION DIVISION.
|
||||
PROGRAM-ID. Concat.
|
||||
|
||||
DATA DIVISION.
|
||||
WORKING-STORAGE SECTION.
|
||||
01 Str PIC X(7) VALUE "Hello, ".
|
||||
01 Str2 PIC X(15).
|
||||
|
||||
PROCEDURE DIVISION.
|
||||
DISPLAY "Str : " Str
|
||||
MOVE FUNCTION CONCATENATE(Str, " World!") TO Str2
|
||||
DISPLAY "Str2 : " Str2
|
||||
|
||||
GOBACK
|
||||
.
|
||||
10
Task/String-concatenation/Racket/string-concatenation.rkt
Normal file
10
Task/String-concatenation/Racket/string-concatenation.rkt
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#lang racket
|
||||
(define hello "hello")
|
||||
(displayln hello)
|
||||
|
||||
(define world (string-append hello " " "world" "!"))
|
||||
(displayln world)
|
||||
|
||||
;outputs:
|
||||
; hello
|
||||
; hello world!
|
||||
15
Task/String-concatenation/Raven/string-concatenation.raven
Normal file
15
Task/String-concatenation/Raven/string-concatenation.raven
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Cat strings
|
||||
"First string and " "second string" cat print
|
||||
|
||||
# Join
|
||||
[ "First string" "second string" "third string" ] " and " join print
|
||||
|
||||
# print
|
||||
[ "First string" "second string" "third string" ] each print
|
||||
|
||||
# Formatted print
|
||||
"\n" "Third string" "Second string" "First string" "%s %s %s %s" print
|
||||
|
||||
# Heredoc
|
||||
" - NOT!!" as $x
|
||||
"This is the only way to do it%($x)s" print
|
||||
Loading…
Add table
Add a link
Reference in a new issue