Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,8 +0,0 @@
|
|||
with Ada.Text_IO; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
|
||||
|
||||
procedure Prepend_String is
|
||||
S: Unbounded_String := To_Unbounded_String("World!");
|
||||
begin
|
||||
S := "Hello " & S;-- this is the operation to prepend "Hello " to S.
|
||||
Ada.Text_IO.Put_Line(To_String(S));
|
||||
end Prepend_String;
|
||||
|
|
@ -7,8 +7,8 @@ b: append "Hello" b
|
|||
print a
|
||||
|
||||
c: "World"
|
||||
prefix 'c "Hello"
|
||||
prepend 'c "Hello"
|
||||
print c
|
||||
|
||||
d: "World"
|
||||
print prefix d "Hello"
|
||||
print prepend d "Hello"
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
identification division.
|
||||
program-id. prepend.
|
||||
data division.
|
||||
working-storage section.
|
||||
1 str pic x(30) value "World!".
|
||||
1 binary.
|
||||
2 len pic 9(4) value 0.
|
||||
2 scratch pic 9(4) value 0.
|
||||
procedure division.
|
||||
begin.
|
||||
perform rev-sub-str
|
||||
move function reverse ("Hello ") to str (len + 1:)
|
||||
perform rev-sub-str
|
||||
display str
|
||||
stop run
|
||||
.
|
||||
|
||||
rev-sub-str.
|
||||
move 0 to len scratch
|
||||
inspect function reverse (str)
|
||||
tallying scratch for leading spaces
|
||||
len for characters after space
|
||||
move function reverse (str (1:len)) to str
|
||||
.
|
||||
end program prepend.
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
>>SOURCE FREE
|
||||
PROGRAM-ID. prepend.
|
||||
|
||||
DATA DIVISION.
|
||||
WORKING-STORAGE SECTION.
|
||||
01 str PIC X(30) VALUE "world!".
|
||||
|
||||
PROCEDURE DIVISION.
|
||||
MOVE FUNCTION CONCATENATE("Hello, ", str) TO str
|
||||
DISPLAY str
|
||||
.
|
||||
END PROGRAM prepend.
|
||||
|
|
@ -1,15 +1,15 @@
|
|||
import extensions;
|
||||
import extensions'text;
|
||||
|
||||
public program()
|
||||
public Program()
|
||||
{
|
||||
var s := "World";
|
||||
s := "Hello " + s;
|
||||
console.writeLine(s);
|
||||
Console.writeLine(s);
|
||||
|
||||
// Alternative way
|
||||
var s2 := StringWriter.load("World");
|
||||
s2.insert(0, "Hello ");
|
||||
console.writeLine(s2);
|
||||
console.readChar()
|
||||
Console.writeLine(s2);
|
||||
Console.readChar()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
(defvar str "bar")
|
||||
(setq str (concat "foo" str))
|
||||
str ;=> "foobar"
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
(require 'cl-lib)
|
||||
|
||||
(defvar str "bar")
|
||||
(cl-callf2 concat "foo" str)
|
||||
str ;=> "foobar"
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
(let ((buf (get-buffer-create "*foo*")))
|
||||
(with-current-buffer buf
|
||||
(insert "bar"))
|
||||
(with-current-buffer buf
|
||||
(goto-char (point-min))
|
||||
(insert "foo")
|
||||
(buffer-string)))
|
||||
;; => "foobar"
|
||||
|
|
@ -1,4 +1,2 @@
|
|||
-->
|
||||
<span style="color: #004080;">string</span> <span style="color: #000000;">s</span> <span style="color: #0000FF;">=</span> <span style="color: #008000;">"World"</span>
|
||||
<span style="color: #000000;">s</span> <span style="color: #0000FF;">=</span> <span style="color: #008000;">"Hello "</span><span style="color: #0000FF;">&</span><span style="color: #000000;">s</span>
|
||||
<!--
|
||||
string s = "World"
|
||||
s = "Hello "&s
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
$str = "World!"
|
||||
$str = "Hello, " + $str
|
||||
$str
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
s = "bar"
|
||||
s = "foo" & s
|
||||
WScript.Echo s
|
||||
Loading…
Add table
Add a link
Reference in a new issue