This commit is contained in:
Ingy döt Net 2013-06-05 21:47:54 +00:00
parent 1f1ad49427
commit 6f050a029e
2496 changed files with 37609 additions and 3031 deletions

View file

@ -0,0 +1,8 @@
text s, v;
s = "Hello";
o_text(s);
o_newline();
v = cat(s, ", World!");
o_text(v);
o_newline();

View file

@ -0,0 +1,5 @@
try
set endMsg to "world!"
set totMsg to "Hello, " & endMsg
display dialog totMsg
end try

View 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
.

View file

@ -0,0 +1,10 @@
#lang racket
(define hello "hello")
(displayln hello)
(define world (string-append hello " " "world" "!"))
(displayln world)
;outputs:
; hello
; hello world!

View 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