Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -0,0 +1,9 @@
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Text_IO.Unbounded_Io; use Ada.Text_IO.Unbounded_IO;
procedure String_Append is
Str : Unbounded_String := To_Unbounded_String("Hello");
begin
Append(Str, ", world!");
Put_Line(Str);
end String_Append;

View file

@ -0,0 +1,23 @@
identification division.
program-id. string-append.
data division.
working-storage section.
01 some-string.
05 elements pic x occurs 0 to 80 times depending on limiter.
01 limiter usage index value 7.
01 current usage index.
procedure division.
append-main.
move "Hello, " to some-string
*> extend the limit and move using reference modification
set current to length of some-string
set limiter up by 5
move "world" to some-string(current + 1:)
display some-string
goback.
end program string-append.

View file

@ -0,0 +1,3 @@
s = "hello"
s += " world!"
p s

View file

@ -0,0 +1,3 @@
(defvar str "foo")
(setq str (concat str "bar"))
str ;=> "foobar"

View file

@ -0,0 +1,5 @@
(require 'cl-lib)
(defvar str "foo")
(cl-callf concat str "bar")
str ;=> "foobar"

View file

@ -0,0 +1,8 @@
(let ((buf (get-buffer-create "*foo*")))
(with-current-buffer buf
(insert "foo"))
(with-current-buffer buf
(goto-char (point-max))
(insert "bar")
(buffer-string)))
;; => "foobar"

View file

@ -0,0 +1,7 @@
sequence string = "String"
printf(1,"%s\n",{string})
string &= " is now longer\n"
printf(1,"%s",{string})

View file

@ -0,0 +1,2 @@
let s = "Hello"
s <> " world"

View file

@ -7,6 +7,8 @@ a$+="(one)"
Print a$
Document b$
b$="1234"
Clear b$ ' use Clear to empty document
b$="ok"
b$="(one)"
Print b$

View file

@ -0,0 +1,3 @@
local s = "Rosetta"
s ..= " Code"
print(s)

View file

@ -0,0 +1,3 @@
$str = "Hello, "
$str += "World!"
$str

View file

@ -0,0 +1,115 @@
# riscv assembly raspberry pico2 rp2350
# program appstring.s
# connexion putty com3
/*********************************************/
/* CONSTANTES */
/********************************************/
/* for this file see risc-v task include a file */
.include "../../constantesRiscv.inc"
.equ BUFFERSIZE, 100
/*******************************************/
/* INITIALED DATAS */
/*******************************************/
.data
szMessStart: .asciz "Program riscv start.\r\n"
szMessEndOk: .asciz "Program riscv end OK.\r\n"
szCariageReturn: .asciz "\r\n"
szMessString: .asciz "String :\n"
szString1: .asciz "Alphabet : "
sComplement: .fill BUFFERSIZE,1,0
szString2: .asciz "abcdefghijklmnopqrstuvwxyz"
.align 2
/*******************************************/
/* UNINITIALED DATA */
/*******************************************/
.bss
.align 2
/**********************************************/
/* SECTION CODE */
/**********************************************/
.text
.global main
main:
call stdio_init_all # général init
1: # start loop connexion
li a0,0 # raz argument register
call tud_cdc_n_connected # waiting for USB connection
beqz a0,1b # return code = zero ?
la a0,szMessStart # message address
call writeString # display message
la a0,szMessString # message address
call writeString # display message
la a0,szString1 # message address
call writeString # display message
la a0,szCariageReturn # message address
call writeString # display message
la a0,szMessString # message address
call writeString # display message
la a0,szString2 # message address
call writeString # display message
la a0,szCariageReturn # message address
call writeString # display message
la a0,szString1
la a1,szString2
call append
la a0,szMessString # message address
call writeString # display message
la a0,szString1 # message address
call writeString # display message
la a0,szCariageReturn # message address
call writeString # display message
la a0,szMessEndOk # message address
call writeString # display message
call getchar
100: # final loop
j 100b
/*********************************************/
/* add string to string */
/*********************************************/
/* no verfication size complement buffer */
/* a0 contains address String 1 */
/* a1 contains address String 2 */
append:
addi sp, sp, -4
sw ra, 0(sp)
li t0,0 # counter byte string 1
1:
add t1,a0,t0
lbu t2,(t1) # load byte string 1
beqz t2,2f # zero final ?
addi t0,t0,1 # no -> increment counter
j 1b # loop
2:
li t3, 0 # counter byte string 2
3:
add t4,a1,t3
lbu t5,(t4) # load byte string 2
add t1,a0,t0
sb t5,(t1) # store byte string 1
beqz t5,100f # zero final ? -> end
addi t3,t3,1 # increment counter
addi t0,t0,1
j 3b # end loop
100:
lw ra, 0(sp)
addi sp, sp, 4
ret
/************************************/
/* file include Fonctions */
/***********************************/
/* for this file see risc-v task include a file */
.include "../../includeFunctions.s"

View file

@ -0,0 +1,2 @@
var 's "hello"
append! " world" 's

View file

@ -0,0 +1,3 @@
s = "Rosetta"
s = s & " Code"
WScript.StdOut.Write s