X-Git-Url: http://git.harvie.cz/?p=svn%2FCll1h%2F.git;a=blobdiff_plain;f=demos%2Frepeat.c;fp=demos%2Frepeat.c;h=b6229e928c4ad2981c4b53fa3f68604311825b39;hp=70a5abec589542579a09ed499b210ff15ea3e6a8;hb=a3c2aecbff1dd82a26f3a69a3e1fdc04349b8d7a;hpb=7bbf75332a1c70ddd99484cba956d8e4df220fb2 diff --git a/demos/repeat.c b/demos/repeat.c index 70a5abe..b6229e9 100644 --- a/demos/repeat.c +++ b/demos/repeat.c @@ -2,9 +2,19 @@ program { - repeat(2) + int i=2; + + repeat(1) { - print("Tohle cele delam 2x:"); - repeat(3) print("Tohle delam 3x..."); + print("This is demonstration, that nesting of C<<1 repeat(N) { ... } flow-control macro is completely safe:"); + repeat(i++) + { + echo("Outer loop is supposed to be done twice: "); + repeat(i) + { + printf("[doing this %d times] ",i); + } + print("... finished."); + } } }