annotate tests/code/while_1.d @ 12:6282db07115f

Added some ekstra tests, and allowed bool as a type
author Anders Halager <halager@gmail.com>
date Fri, 18 Apr 2008 13:58:27 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12
6282db07115f Added some ekstra tests, and allowed bool as a type
Anders Halager <halager@gmail.com>
parents:
diff changeset
1 int main()
6282db07115f Added some ekstra tests, and allowed bool as a type
Anders Halager <halager@gmail.com>
parents:
diff changeset
2 {
6282db07115f Added some ekstra tests, and allowed bool as a type
Anders Halager <halager@gmail.com>
parents:
diff changeset
3 int x = 10;
6282db07115f Added some ekstra tests, and allowed bool as a type
Anders Halager <halager@gmail.com>
parents:
diff changeset
4 while (x > 0)
6282db07115f Added some ekstra tests, and allowed bool as a type
Anders Halager <halager@gmail.com>
parents:
diff changeset
5 x = x - 1;
6282db07115f Added some ekstra tests, and allowed bool as a type
Anders Halager <halager@gmail.com>
parents:
diff changeset
6 return x;
6282db07115f Added some ekstra tests, and allowed bool as a type
Anders Halager <halager@gmail.com>
parents:
diff changeset
7 }
6282db07115f Added some ekstra tests, and allowed bool as a type
Anders Halager <halager@gmail.com>
parents:
diff changeset
8