repo.or.cz
/
chuck-blob.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
*** empty log message ***
[chuck-blob.git]
/
exile
/
v1
/
examples
/
ctrl.ck
blob
9126be9c306d98048412dd463802a285e1918871
1
// loops are useful
2
3
"" => stdout;
4
"while 1" => stdout;
5
0 => int i;
6
while( i < 5 )
7
{
8
++i => stdout;
9
}
10
11
"" => stdout;
12
"while 2" => stdout;
13
0 => i;
14
while( i < 5 )
15
++i => stdout;
16
17
"" => stdout;
18
"until 1" => stdout;
19
0 => i;
20
until( i >= 5 )
21
++i => stdout;
22
23
"" => stdout;
24
"until 2" => stdout;
25
0 => i;
26
until( 5 <= i )
27
++i => stdout;
28
29
"" => stdout;
30
"for 1" => stdout;
31
for( 0 => i; i < 5; i++ )
32
i => stdout;
33
34
"" => stdout;
35
"for 2" => stdout;
36
0 => i;
37
for( ; i < 5; i++ )
38
i => stdout;
39
40
"" => stdout;
41
"for 3" => stdout;
42
0 => i;
43
for( ; i < 5; )
44
++i => stdout;
45
46
"" => stdout;
47
"for 3" => stdout;
48
1 => i;
49
for( ; i < 64; 2*i => i )
50
i => stdout;
51