more tests of repeat() { } macro
[svn/Cll1h/.git] / demos / repeat.c
CommitLineData
04a13a6f 1#include "cll1.h"
2
3program
4{
a3c2aecb 5 int i=2;
6
7 repeat(1)
04a13a6f 8 {
a3c2aecb 9 print("This is demonstration, that nesting of C<<1 repeat(N) { ... } flow-control macro is completely safe:");
10 repeat(i++)
11 {
12 echo("Outer loop is supposed to be done twice: ");
13 repeat(i)
14 {
15 printf("[doing this %d times] ",i);
16 }
d306de9a 17 repeat(0)
18 {
19 printf("[doing this 0 times] ",i);
20 }
21 repeat(-1)
22 {
23 printf("[doing this -1 times] ",i);
24 }
25 repeat(1)
26 {
27 printf("[doing this 1 times] ",i);
28 }
a3c2aecb 29 print("... finished.");
30 }
04a13a6f 31 }
32}
This page took 0.203117 seconds and 4 git commands to generate.