Time for an 2014 update…

This commit is contained in:
Ingy döt Net 2014-01-17 05:32:22 +00:00
parent 372c577f83
commit 09687c4926
2520 changed files with 34227 additions and 7318 deletions

View file

@ -0,0 +1,4 @@
100 DEF FN P(A) = PEEK (A) + PEEK(A + 1) * 256 : FOR I = FN P(105) TO FN P(107) - 1 STEP 7 : ON PEEK(I + 1) < 128 OR PEEK(I) > 127 GOTO 130 : ON LEFT$(P$, 1) <> CHR$(PEEK(I)) GOTO 130
110 IF LEN(P$) > 1 THEN ON PEEK(I + 1) = 128 GOTO 130 : IF MID$(P$, 2, 1) <> CHR$(PEEK(I + 1) - 128) GOTO 130
120 POKE I + 4, P / 256 : POKE I + 3, P - PEEK(I + 4) * 256 : RETURN
130 NEXT I : STOP

View file

@ -0,0 +1,2 @@
S$ = "HELLO" : REM S$ IS THE ORIGINAL STRING
C$ = S$ : REM C$ IS THE COPY

View file

@ -0,0 +1,3 @@
P$ = "S" : P = 53637 : GOSUB 100"POINT STRING S AT SOMETHING ELSE
?S$
?C$

View file

@ -1,13 +1,10 @@
#include <iostream>
#include <string>
#include <algorithm>
int main( ) {
std::string original ( "This is the original" ) ;
std::string mycopy( original.length( ) , ' ' ) ;
std::copy ( original.begin( ) , original.end( ) , mycopy.begin( ) ) ;
std::cout << "This is the copy: " << mycopy << std::endl ;
original.assign( "Now we change the original! " ) ;
std::cout << "mycopy still is " << mycopy << std::endl ;
return 0 ;
std::string original ("This is the original");
std::string my_copy = original;
std::cout << "This is the copy: " << my_copy << std::endl;
original = "Now we change the original! ";
std::cout << "my_copy still is " << my_copy << std::endl;
}

View file

@ -0,0 +1,3 @@
local :orgininal "this is the original"
local :scopy concat( original "" )
!. scopy

View file

@ -1,2 +1,2 @@
src = "string"
dest = src
src = "string";
dest = src;

View file

@ -1,2 +1,3 @@
src = "this is a string"
<br><br>Note that all REXX values (variables) are stored as character strings.
dst = src