Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,17 @@
include xpllib; \provides StrLen and StrFind
proc PMid(S, N, M); \Print string at Nth character M chars long
char S, N, M, I;
[for I:= 1 to M do ChOut(0, S(N-2+I));
CrLf(0);
];
char S;
def N=2, M=3;
[S:= "abcdefgh";
PMid(S, N, M); \starting from N chars in and of M length
PMid(S, N, StrLen(S)-N+1); \starting from N chars in, up to end of string
PMid(S, 1, StrLen(S)-1); \whole string minus last character
PMid(StrFind(S, "d" ), 1, M); \starting from known char and of M length
PMid(StrFind(S, "cd"), 1, M); \starting from known substring and of M length
]