GIT.Harvie.CZ
/
svn
/
Cll1h
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LC_NUMERIC locale will be set to "C" by default
[svn/Cll1h/.git]
/
demos
/
repeat.c
diff --git
a/demos/repeat.c
b/demos/repeat.c
index b6229e928c4ad2981c4b53fa3f68604311825b39..491b74ddde05917cc6ed7b776aa41ba72f094eb7 100644
(file)
--- a/
demos/repeat.c
+++ b/
demos/repeat.c
@@
-9,12
+9,28
@@
program
print("This is demonstration, that nesting of C<<1 repeat(N) { ... } flow-control macro is completely safe:");
repeat(i++)
{
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: ");
+ echo("
This loop is supposed to be repeated
twice: ");
repeat(i)
{
printf("[doing this %d times] ",i);
}
repeat(i)
{
printf("[doing this %d times] ",i);
}
+ repeat(0)
+ {
+ printf("[doing this 0 times] ",i);
+ }
+ repeat(-1)
+ {
+ printf("[doing this -1 times] ",i);
+ }
+ repeat(1)
+ {
+ printf("[doing this 1 times] ",i);
+ }
print("... finished.");
}
print("... finished.");
}
- }
+ }
+ repeat(--i)
+ {
+ print("This loop is not nested and it is supposed to be repeated again just twice.");
+ }
}
}
This page took
0.133769 seconds
and
4
git commands to generate.