langs a-z

This commit is contained in:
Ingy döt Net 2013-04-10 22:43:41 -07:00
parent db842d013d
commit d066446780
11389 changed files with 98361 additions and 1020 deletions

View file

@ -0,0 +1,23 @@
string 0; \use zero-terminated string convention
code Text=12;
func StrLen(A); \Return number of characters in an ASCIIZ string
char A;
int I;
for I:= 0 to -1>>1-1 do
if A(I) = 0 then return I;
proc IncStr(S); \Increment a numeric string
char S;
int I;
[for I:= StrLen(S)-1 downto 0 do
[S(I):= S(I)+1;
if S(I) > ^9 then S(I):= S(I)-10 else return;
];
];
char Str;
[Str:= "0123999999999"; \MSD first (big endian)
IncStr(Str); IncStr(Str);
Text(0, Str);
]