Initial commit
Test (in pplus-core) / in-core (push) Failing after 28m44s

This commit is contained in:
alexm committed 2026-11-12 22:23:48 -05:00
commit 568474d52f
1591 files changed
+528213

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
// Cryptography flavor: CHAR arithmetic with ORD and CHR, MOD to wrap.
// EXPECT: KHOOR, ZRUOG!
// EXPECT: HELLO, WORLD!
FUNCTION SHIFT(S : STRING, K : INTEGER) RETURNS STRING
DECLARE Out : STRING
Out <- ""
FOR EACH C IN S
IF C >= 'A' AND C <= 'Z' THEN
Out <- Out & CHR((ORD(C) - ORD('A') + K) MOD 26 + ORD('A'))
ELSE
Out <- Out & C
ENDIF
NEXT C
RETURN Out
ENDFUNCTION
OUTPUT SHIFT("HELLO, WORLD!", 3)
OUTPUT SHIFT(SHIFT("HELLO, WORLD!", 3), 23)