blob: 5ddde54d1aa707f3954f63fd23cb76f17617a53e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
global str[32];
main() {
strappend('H');
strappend('e');
strappend('l');
strappend('l');
strappend('o');
strappend(' ');
strappend('W');
strappend('o');
strappend('r');
strappend('l');
strappend('d');
strappend('!');
strappend('\n');
print(str);
}
strappend(c) {
local s;
s = str;
loop {
if ([s] == 0)
break;
s = s + 1;
}
[s] = c;
}
print(s) {
loop {
if ([s] == 0)
break;
wrt [s];
s = s + 1;
}
}
|